Page A : Any page.
Page B : Page that has Iframe on it
What I would to do is something like this.
There is a link on Page A to Page B, Something like: “abcd.com/thewall?parameter”
When they click the url to “abcd.com/thewall” the site loads like it always does with a set src for the iframe. But when they click the url with the parameter like “abcd.com/thewall?parameter” the Iframe will automatically load a different src into that iframe.
I’ve found many references to do stuff LIKE this on here but none of them do exactly what is described above.
Also I don’t know if its possible but would it be able to also when that new url is loaded into the src of the iframe via the parameter call have it auto scroll to the iframe?
I basically know 0 about JavaScript, so please keep it simple so i can understand.
Thank you.
Parse the query string like this and set the iframe’s src
onDOMReady. Since jQuery is what I’m most familiar with, that’s what I’ll use:This uses a modified version of the
getQuerystringfunction from the linked page.