By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,389 Members | 2,065 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,389 IT Pros & Developers. It's quick & easy.

Passing information from a document to a standard FORM

P: n/a
rfr
I have a need to use a single version of a Visitor Response Feedback Form on
numerous
HTML documents. Rather than have numerous versions of this, one on each HTML
document, it makes more sense to have ONE FORM and use it from each HTML
document that needs it.

But, the visitor should see a title on the form that relates to the specific
page about which they are giving the feedback. And the results of the form
must include what page was being viewed.

Passing a variable from the visited HTML document to the Form seemed like it
should be simple. Ha ha ha!

I Googled for some examples.

I found one that did it the other way around and passed variable from a Form
to an HTML document. But, I could not get this process to work feeding INTO
the Form. http://www.netwood.net/~kosenko/JS5.html

Does anyone have an example of how to pass a variable INTO a Form from
another HTM document? Or know where there is a tutorial?

Jun 19 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
rfr wrote:
I have a need to use a single version of a Visitor Response Feedback Form
on numerous
HTML documents. Rather than have numerous versions of this, one on each
HTML document, it makes more sense to have ONE FORM and use it from each
HTML document that needs it.

But, the visitor should see a title on the form that relates to the
specific page about which they are giving the feedback. And the results of
the form must include what page was being viewed.

Passing a variable from the visited HTML document to the Form seemed like
it should be simple. Ha ha ha!

I Googled for some examples.

I found one that did it the other way around and passed variable from a
Form to an HTML document. But, I could not get this process to work
feeding INTO the Form. http://www.netwood.net/~kosenko/JS5.html

Does anyone have an example of how to pass a variable INTO a Form from
another HTM document? Or know where there is a tutorial?
Hi,

It is actually not very complex.
We must know where the forms are to give you the excact code.

A few relevant questions:

Are the forms in the same page?
Or is one form in another window?

If so, what are the names of the windows?
Or can the popupwindow (if any) adres the former window via opener?
What are the names of the forms?
What is the name of the variable you want to pass?

Are both pages in the same domain?

A few solutions are possible: passing direct via GET, like opening this:
http://www.example.com/feedbackform.html?origin=bla1

You can read ?origin=bla1 from feedbackform.html

Or you can let the feedbackform query the other page, if they are in the
same domain.

Or use a cookie.

regards,
Erwin Moller
Jun 19 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.