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 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"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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') &&
    (parseInt(navigator.appVersion)>=4))
  {
    window.external.AddFavorite(url, sitename);
  }
  else if (navigator.appName=='Netscape')
  {
    alert(ns);
    //document.write (document.location.href); 
  }
}
//-->
</script>

</head>
<body>
<form method="GET" action='Controller' name="showall">
<table>
    <tr>
        <td><input type="checkbox" name="id1" /></td>
        <td>Jim</td>
        <td>Knopf</td>
    </tr>
    <tr>
        <td><input type="checkbox" name="id2" /></td>
        <td>Jim</td>
        <td>Bean</td>
    </tr>
</table>

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


</body>
</html>

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
Advertisements
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
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:ADS
capture
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
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
ModuleNotFoundError: No module named 'capture'
ModuleNotFoundError: No module named 'capture'  Hi, My Python... 'capture' How to remove the ModuleNotFoundError: No module named 'capture... to install padas library. You can install capture python with following command
ModuleNotFoundError: No module named 'capture'
ModuleNotFoundError: No module named 'capture'  Hi, My Python... 'capture' How to remove the ModuleNotFoundError: No module named 'capture... to install padas library. You can install capture python with following command
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
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
JavaScript
JavaScript  clone JavaScript
php web page capture
php web page capture  How to capture the history of a web page using PHP
javascript
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
Javascript
Javascript  How validations are done using javascript ,with example? and interview questions on javASCRIPT
JavaScript
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
JavaScript  how to get full path of a file type in javascript
javascript
javascript  Hi deepak, how to write form validation on javascript
javascript
javascript  write a program to display implement about browsers using javascript
javaScript
javaScript  How to open a browser window that cannot be resized? (HTML + Javascript
javascript
javascript  i have just learned javascript... can you tell me what kind of applications can be made by javascript?? thank you
javascript
javascript  how to set the request or session attribute in javascript head part of jsp page
javascript
javascript  hi sir, if i want to learn javascript. what concepts i want to know
javascript
javascript  Hi sir, This is sinduri, i want to learn javascript, so plz can u help me.how to learn
ModuleNotFoundError: No module named 'link_capture'
ModuleNotFoundError: No module named 'link_capture'  Hi, My Python... 'link_capture' How to remove the ModuleNotFoundError: No module named 'link_capture' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'quartet_capture'
ModuleNotFoundError: No module named 'quartet_capture'  Hi, My... named 'quartet_capture' How to remove the ModuleNotFoundError: No module named 'quartet_capture' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'todoist-capture'
ModuleNotFoundError: No module named 'todoist-capture'  Hi, My... named 'todoist-capture' How to remove the ModuleNotFoundError: No module named 'todoist-capture' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'trello-capture'
ModuleNotFoundError: No module named 'trello-capture'  Hi, My... named 'trello-capture' How to remove the ModuleNotFoundError: No module named 'trello-capture' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'capture-assembler'
ModuleNotFoundError: No module named 'capture-assembler'  Hi, My... named 'capture-assembler' How to remove the ModuleNotFoundError: No module named 'capture-assembler' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'capture-me'
ModuleNotFoundError: No module named 'capture-me'  Hi, My Python... 'capture-me' How to remove the ModuleNotFoundError: No module named 'capture-me' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'fer-capture'
ModuleNotFoundError: No module named 'fer-capture'  Hi, My Python... 'fer-capture' How to remove the ModuleNotFoundError: No module named 'fer-capture' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'gripit-capture'
ModuleNotFoundError: No module named 'gripit-capture'  Hi, My... named 'gripit-capture' How to remove the ModuleNotFoundError: No module named 'gripit-capture' error? Thanks   Hi, In your python
JAVASCRIPT
JAVASCRIPT  I have one textbox and I want to validate that it must start with number(1-0). can anyone tell me a javascript for that ? thanks in advance
Javascript
Javascript   Javascript to check Numeric entry in checkbox.....   Hi Please find the following code for numeric entry validation in javascript function validateBox(){ var data=document.myForm.someText.value
javascript
javascript  hi, I was actually working on to calculate the number of days between two dates of yyyy-mm-dd format using javascript, and when i click on button then number of days should be display in textbox
javaScript
javaScript  . Print a table like below in JAVASCRIPT 5 x 1 = 5 5 x 2 = 10 ΓΆβ?¬Β¦ΓΆβ?¬Β¦ΓΆβ?¬Β¦. 5 x 20 = 100
javascript
javascript  passing javascript values to jsp   Hi Friend, Try the following code:ADS_TO_REPLACE_1 form.jsp: <html> <script>... Javascript value In JSP"> <% String st=request.getParameter("msg"); if(st
Javascript
this format xxx-xxx-xxxx, i want the code in javascript. as a function.   Javascript Phone Number Validation <html> <script> function..." method="post" onsubmit="javascript:return validate();"> Phone Number:<
Javascript
Javascript  Dear Sir, Thank You a lot for your continuos support.Again i am in need of your help. What is the javascript code to disable a link,once... javascript or css Please help me.Urgent Regards Debasis   Hello Friend
Javascript
Javascript  <html> <head> <script type="text/javascript"> function validateForm() { var sname=document.getElementById('spocname'); var scontact=document.getElementById('spoccontact'); if(sname.value.length
javascript
javascript
javascript  how to create random question using javascript?   <html> <script> function displayQuestions() { document.getElementById("text").value=" "; var Questions = new Array(20
javascript
javascript
javascript  Hi deepak, sample example on javascript form validation   <html> <script> function checkName(text) { if(isNaN(text)){ return 1; } else{ alert("Please enter a valid name. The only charachters
ModuleNotFoundError: No module named 'django-capture-tag'
ModuleNotFoundError: No module named 'django-capture-tag'  Hi, My... named 'django-capture-tag' How to remove the ModuleNotFoundError: No module named 'django-capture-tag' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'docker-netowrk-capture'
ModuleNotFoundError: No module named 'docker-netowrk-capture'  Hi...: No module named 'docker-netowrk-capture' How to remove the ModuleNotFoundError: No module named 'docker-netowrk-capture' error? Thanks   Hi
ModuleNotFoundError: No module named 'docker-network-capture'
ModuleNotFoundError: No module named 'docker-network-capture'  Hi...: No module named 'docker-network-capture' How to remove the ModuleNotFoundError: No module named 'docker-network-capture' error? Thanks   Hi

Ads