• NOW LIVE! Into the Woods--new character species, eerie monsters, and haunting villains to populate the woodlands of your D&D games.

HTML Assistance

BobROE

Explorer
Can anyone help me with the following?

Say I have a webpage with some information on it, and each piece of information has it's own ID.

Is there anyway I can have another webpage get the info by ID off the first page and put it on the second?
 

log in or register to remove this ad

BobROE said:
Can anyone help me with the following?

Say I have a webpage with some information on it, and each piece of information has it's own ID.

Is there anyway I can have another webpage get the info by ID off the first page and put it on the second?

That would depend ...

If you click on a link on the first and open the second you can pass the IDs you require in the http line with parameters using ?p1=x&p2=y etc

You can use sessions to store information and the other page can read it.

If you are talking about a page you have no control over, you could create a second page that would "download" the first page (read the HTML text) and then "chew" that up for data.

A little more information on the situation would be good.
 

dvvega said:
That would depend ...

If you click on a link on the first and open the second you can pass the IDs you require in the http line with parameters using ?p1=x&p2=y etc

You can use sessions to store information and the other page can read it.

If you are talking about a page you have no control over, you could create a second page that would "download" the first page (read the HTML text) and then "chew" that up for data.

A little more information on the situation would be good.

Ok. I have a group of webpages that have a question and an answer where the answer is hidden until you click on a link (using a java script).

Now I want to create one page that has all the questions, or all the questions and the answers, etc. So it can be printed.
 

BobROE said:
Ok. I have a group of webpages that have a question and an answer where the answer is hidden until you click on a link (using a java script).

Now I want to create one page that has all the questions, or all the questions and the answers, etc. So it can be printed.

Rather than having page b access page a, you're much better separating out the information into it's own container. That could be a flat file, XML file, database, or what have you.

Then, you write page A (question & hidden answer) to pull out the information it cares about, and then write page B to pull out the information that it cares out separately. The two pages know nothing about each other.
 

to use the embedded id's you need to parse the page either on the server or on the client. it can be done but unless you do it on the server, you have to write a lot of code to be sure it renders correct in all clients.

instead put named anchor elements into you html. fx if you have a table with weather information on source page then add
Code:
<a name="tblWeather">
just before your
Code:
<table>
tag.
From you target page you can then address the section using:
Code:
<iframe src="http://myserver/mysource.html#tblWeather" />

there is offcourse some clipping issues here :D

/F
 

Into the Woods

Remove ads

Top