Mamta Rai
url capture in javaScript
0 Answer(s)      3 years and 8 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" "">
<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('',
'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<
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 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 "". 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
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
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
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 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
Capture browser file download event - JSP-Servlet
Capture browser file download event  Hi, I appreciate your help and thaanks for that.But my question was when filedownload dialog box comes in browser,how we can come to know that user has clicked on Open,save or cancel button
Data Capture from resume - JSP-Servlet
Data Capture from resume  Hi Sir, In My Application, when i Upload a resume the relevant columns like name,phone,email,skills etc need to be captured automatically and must be stored into the database. Please solve
Friendly URl
Friendly URl  creating a SEO friendly URL
URL problem
URL problem  Hi. I have created a webpage for my project website. in that i have used frameset to split the page. Now if i click any link in the page its navigating to the another page. but the problem is here in the url its
hide url
hide url  how i can hide url i have lot of jsp pages when i call one jsp in address another jsp page name also displayed in the address bar? url not visible to endusers please tell me any answer what i should do
Assigning URL
url to my attendancetemplate.jsp file, please help me if anyone knows, am
JavaScript  clone JavaScript
how to capture jsf form data - Java Server Faces Questions
how to capture jsf form data  hi , i have a jsf page with username... = null; String url = "jdbc:mysql://localhost:3306/"; String dbName = "user... = DriverManager.getConnection(url+dbName,userName,db_password); System.out.println("Connected
javascript  javascript code to dynamically add table on button click.../javascript/javascriptexamples/javascript-add-row-dynamically.shtml
Javascript  How validations are done using javascript ,with example? and interview questions on javASCRIPT
javaScript  How to open a browser window that cannot be resized? (HTML + Javascript
javascript  write a program to display implement about browsers using javascript