Solved

Parameters between pages HTML

Posted on 1998-09-24
1
144 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
ID: 1828813
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

772 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