Solved

Parameters between pages HTML

Posted on 1998-09-24
1
139 Views
Last Modified: 2013-12-25
Can anybody give me an Example?

Y 'am working with Java and Y have 2 HTML pages in the same Window of the Browser.
In Page A  Y am calling Page B with the statement showDocument like this :

showDocument(PageB)
This works fine but if Y have to pass a Parameter should Y do like this ?
showDocument(PageB?name=value)

If it`s like this how should be the code of PAGE B ( the code to receive the parameter).

Y'am not shure if Y'am doing this rigth.
PD: Y heard something about CGI but Y don't know much ( so Y need an Example)


 
0
Comment
Question by:cari
1 Comment
 
LVL 11

Accepted Solution

by:
mouatts earned 150 total points
Comment Utility
I presume you are talking about javascript and not Java. Anyhow if page B is a plain HTML page you cannot simply pass it a parameter in the way that you have done. The approach that you have taken would be fine if it were a CGI (which is a program) that outputs the HTML.

As you state that it is plain HTML the way to pass the parameters is to have some Javascript in page B which is executed when the page loads and fetches a parameter from page A.

The code would be along the lines

pageb.myvalue=pagea.myvalue

where pagea and pageb are the frame names and myvalue are the variables that hold the value in each page.

The code would be executed by using the onLoad event in the body statement of page b.
If it is indeed a CGI that you want then there is a lot to be covered and you would be better to read up on CGIs and then repose any questions that you have (specifing the language that you are using).
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now