Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2005

Tip: Looking for answers? Try searching our database.

read variable from  URL into html page

Thread view: 
nissim.mimran@gmail.com - 27 Dec 2005 14:40 GMT
Hi,

i have a problem reading variable from url to the html page that he
lauches.
example:
URL :

http://10.10.10.1/index.html?%var1%var2

i need to pass var1 and var2 into the html page.

index.html example :

<html>

<head>

<meta http-equiv="Content-Type"

content="text/html; charset=iso-8859-1">

<!-- NOTE TO TRANSLATORS: the style sheet link below has to be replaced
as follows:

Japanese: help/ja/common/css/nextgen.css

Spanish: help/es/common/css/nextgen.css -->

 <link rel="stylesheet" type="text/css"
href="help/en/common/css/nextgen.css">

 <title>VantagePoint for UNIX</title>

</head>

<body bgcolor="white">

<APPLET CODE="com.hp.ov.it.ui.OvEmbApplet" ARCHIVE="ito_op.jar,
ito_op_addon.jar" WIDTH="100%" HEIGHT="100%" ALIGN="baseline" ></XMP>

<PARAM NAME = CODE VALUE = "com.hp.ov.it.ui.OvEmbApplet" >

<PARAM NAME = ARCHIVE VALUE = "ito_op.jar, ito_op_addon.jar" >

<PARAM NAME = "type" VALUE = "application/x-java-applet;version=1.4" >

<PARAM NAME = display VALUE = "">

<PARAM NAME = initial_node VALUE = "">

<PARAM NAME = user VALUE = "var">

<PARAM NAME = passwd VALUE = "var2">

<PARAM NAME = trace VALUE = "">

</APPLET>

</NOEMBED></EMBED></OBJECT>

<!--"END_CONVERTED_APPLET"-->

</body>

</html>

i need to pass the var's into user and password inside the html.
how can i do it ?

Thanks a lot

Niko
Real Gagnon - 27 Dec 2005 15:51 GMT
> i need to pass the var's into user and password inside the html.
> how can i do it ?

With Javascript, you extract the values from the document.location.search
and then, you document.write() the PARAM.

See http://www.rgagnon.com/javadetails/java-0181.html for an example.

Bye.
Signature

Real Gagnon  from  Quebec, Canada
* Looking for Java or PB code examples ? Visit Real's How-to  
* http://www.rgagnon.com/howto.html



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.