Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Open an html page with bookmarks

 
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a directory docroot/pages, which contains some jsp pages.
The help file for all these pages reside under docroot/help.

In my JSP pages, I want to use Javascript to open the help file in a new window. How do i do this?

Also, if I have to pass a parameter to the help file, how do i this thru the javascript function.

Please help me with code snippets.
 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

use window.open(filename?parameterlist);

and in the target html file

call a function onload of html and
use
url = this.location.href
// this would give the entire url
// use split command to retrieve various values
// this returns an array with tokens - just like string tokenizer in java

parameterList=url.split("?")

// use your parameter separator instead of ?

and then use split again on the parameterList[0] to total to retrieve the values..


Balaji
 
snakes are really good at eating slugs. And you wouldn't think it, but so are tiny ads:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic