Link to home
Start Free TrialLog in
Avatar of judsonmusic
judsonmusicFlag for United States of America

asked on

jquery read post data from url in a .load on the called page.

I am performing a

 $.('#mycontainer').load('myurl.html?id=123');

on the myurl.html when I try to read the location.href, it is showing me the index.html(parent container) url.

I need to be able to read the id param from the url on the myurl.html page to determine what I need to do as it can change based on certain things.

At the end, the question is how do I read the url param from the page that was called in?

Thanks

Judson
ASKER CERTIFIED SOLUTION
Avatar of Proculopsis
Proculopsis

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of judsonmusic

ASKER

Thats what I was afraid of. I can do this with coldfusion or anther server language no problem but am trying to figure out a way to manipulate data without using a server side language.

I could easily grab the attribute like id=1, or id=2 and then set my url accordingly. but I want to have code blocks instead. maybe I can show hide onsuccess based on the id?
Avatar of Proculopsis
Proculopsis

I'm guessing the content being loaded is static but if you can change myurl.html to myurl.cfm then you will unlock all the information you need.  Or you could use some kind of proxy - loader.cfm?content=myurl.html&id=123' and get it to include the content.