Can HTML directly pass ref to another HTML

S

Steve Pugh

Peter C said:
I would like to know if html can pass reference to another html page
directly,

In a link
<a href="anotherpage.html?ref=value">

Or via a form
<form action="anotherpage.html" method="get">
if is possible can anyone tell mw how to receive ref?? Thank you

HTML is a data format. It doesn't 'do' anything. So in the above
examples the passed reference will be in the URL of the page but won't
have any effect if the page is just HTML. So instead the page should
be a CGI script or some other server side language which can interpret
the reference and modify the output page accordingly. Alternatively
you could use JavaScript and do the modification at the browser end
but this would be a bad idea unless you were either in a very
controlled environment where you can certain that JS is enabled, or
dealing with something that doesn't matter and has a suitable default
for when JS is disabled.

All the above is very vague, but I'm afraid that so was your question.
If you could explain what you are trying to do someone here can
probably point you in the direction of a more complete solution.

Steve
 
C

Chris Morris

Peter C said:
I would like to know if html can pass reference to another html page
directly, if is possible can anyone tell mw how to receive ref?? Thank you

Not sure what you mean by this. So, wild guess pending an example:

You can put a link in of the form <a href="foo?a=1">foo</a> which
passes the variable 'a' with value '1' to 'foo'. However, if 'foo' is
just a HTML page it will not be able to make sense of this -
server-side scripting is required.
 
P

Peter C

I would like to know if html can pass reference to another html page
directly, if is possible can anyone tell mw how to receive ref?? Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top