url capture in javaScript



Share on Google+Share on Google+

Mamta Rai
url capture in javaScript
0 Answer(s)      6 years and 3 months ago
Posted in : JavaScript Questions

Hi All, I m creating a bookmark to capture the url of the site and the user's input in the bookmark,in javaScript.this url and user input is to be saved into DB. Following is my code.Result is not appropriate,what I need.Below is my code,where do I need to change it:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Show all names</title>
<script type="text/javascript">
function bookmark(url, sitename)
{    document.write (document.location.href);
       document.write (window.parent.document.location.hre);
  ns="Netscape and FireFox users, use CTRL+D to bookmark this site."
  if ((navigator.appName=='Microsoft Internet Explorer') &&
    window.external.AddFavorite(url, sitename);
  else if (navigator.appName=='Netscape')
    //document.write (document.location.href); 

<form method="GET" action='Controller' name="showall">
        <td><input type="checkbox" name="id1" /></td>
        <td><input type="checkbox" name="id2" /></td>

<p><input type="submit" name="delete" value="delete" />&nbsp; 
   <input type="submit" name="edit" value="edit" />&nbsp; 
    <input type="reset"
    value="reset" /></p>
<a href="javascript:bookmark('http://www.mydomainname.com/',
'My Site Name');">Bookmark This Site</a>


Please suggest.

View Answers

Related Tutorials/Questions & Answers:
url capture in javaScript
url capture in javaScript  Hi All, I m creating a bookmark to capture the url of the site and the user's input in the bookmark,in javaScript.this url and user input is to be saved into DB. Following is my code.Result
How to capture screenshot in url?
How to capture screenshot in url?  Hi, How to capture screenshot and it will store the capture image in url like this http://localhost/xxx/yyy/ it wil not sore C:\ or D:\ it should store like this http://localhost/xxx/yyy
javascript for websites url validation
javascript for websites url validation  javascript for websites url validation   JavaScript Code for URL Validation **function isvalidurl(url) { return url.match(/^(ht|f)tps?:\/\/[a-z0-9-.]+.[a-z]{2,4}\/?([^\s<
javascript regex validate url
javascript regex validate url  How to validate URL in regex Javascript   <html> <head> <title>Url validation using regex</title> <script type="text/javascript"> function validate
capture  How can i capture values or text selected in drop down menu or in combo box or in any input forms and print it on the same page ?? also the selected value i want to store it in data base. how can i do that?? plzzzz
JavaScript Open URL
JavaScript Open URL...; In this section, you will learn how to open the url on the window.  As we know that window.location object that contains the current URL information
JavaScript Navigate to URL
JavaScript Navigate to URL...; JavaScript provides several methods and properties which allow the user... to the specified URL "http://www.roseindia.net". Here is the code
URL validation in JavaScript
URL validation in JavaScript In this tutorial we are going to discuss, how to validate a URL in JavaScript. Java Script is a Scripting language. A Java Script language is a lightweight programming language. JavaScript code are written
webpage capture
webpage capture   webpage capture source code using jsps and servlets
Screen Capture
Screen Capture  How to capture the screen using jsps and servlets
Capture a image and upload to server
Capture a image and upload to server  Hai team i have trouble to capture a image and upload to server in java me........... So i want a code immediately,.......To capture a image and upload to server in j2me...... If you give
php web page capture
php web page capture  How to capture the history of a web page using PHP
JavaScript location.replace() method
JavaScript location.replace() method       JavaScript method location.replace(URL) immediately redirects to the specified URL location. After calling replace() method ,you cannot go
URL Encoding and URL Decoding
URL Encoding and URL Decoding  What is URL Encoding and URL Decoding ?   URL encoding is the method of replacing all the spaces and other extra characters into their corresponding Hex Characters and Decoding
JavaScript  clone JavaScript
can I capture wifi trafic in windows?
can I capture wifi trafic in windows?  Hi, can I analyse wifi trafic in windows and not in linux ? thank you
javascript  javascript code to dynamically add table on button click.../javascript/javascriptexamples/javascript-add-row-dynamically.shtml http://www.roseindia.net/javascript/javascript-add-row-to-table.shtml http://www.roseindia.net
Friendly URl
Friendly URl  creating a SEO friendly URL
Javascript  How validations are done using javascript ,with example? and interview questions on javASCRIPT
How to capture picture from webcam using java
How to capture picture from webcam using java  i want catch the image from web-cam using jsp, If anyone knows please answer me
How to capture output from console into textarea in java?
How to capture output from console into textarea in java?  Hi, I would like to know how can we display the result of a program in java into a textarea instead of displaying it on console. Thanks
should use JavaScript? Thanks   Hi, JavaScript is scripting language that runs on browser. You have to embed JavaScript in HTML page. Please see JavaScript tutorial. Thanks
JavaScript  how to get full path of a file type in javascript
javascript  Hi deepak, how to write form validation on javascript
javascript  write a program to display implement about browsers using javascript
javaScript  How to open a browser window that cannot be resized? (HTML + Javascript
javascript  i have just learned javascript... can you tell me what kind of applications can be made by javascript?? thank you
How to capture video and then how to store it in mobile memory
How to capture video and then how to store it in mobile memory  Hello there, I'm developing a mobile application where i'm capturing video from... but they are not working properly some of them capture video but doesn't allow me
javascript  how to set the request or session attribute in javascript head part of jsp page
javascript  Hi sir, This is sinduri, i want to learn javascript, so plz can u help me.how to learn
javascript  hi sir, if i want to learn javascript. what concepts i want to know


Advertisement null