[RESOLVED] integrating aspx page in html/php page with frames
how can I integerate my aspx page into my existing php/html frameset page?
so far I've designed the aspx page, now I need to know what to put in my button_click event.
in javascript I use this to get one textbox's text:
var t1=window.parent.text1.getText();
and this to set another textbox's text:
window.parent.text2.setText("text");
how can I tie this in to my button_click event?
Re: integrating aspx page in html/php page with frames
You mean Iframe?
Please note that the pages must be in the same domain, else JS posses security restrictions.
I'm not sure how PHP to ASPX does what you want. In aspx, i guess you could document.getElementById and get the page you want but i'm not sure if this will work on PHP, meaning if it's the same javascript for PHP and ASPX pages. If not, i think your best bet is to post this on PHP, if it works and you get an iframe back then you can post for to JS forum.
You can try this before you go to your quest:
Code:
var aspxIframe = document.getElementById("myaspxIDforIframe");
var aspxIframeDoc = (aspxIframe.contentWindow || aspxIframe.contentDocument);
Re: integrating aspx page in html/php page with frames
wether it is ASPX or PHP should be irrelevant... JS is client side, so all it sees is the rendered html on the client, it shouldn't know or care if it was processed on the server with PHP or ASPX...
That said, and maybe I'm not seeing what the issue is, but it seems like you nee the js in a funciton, which you then call with an onClick="" method on the button.
It's been so long since I've seen anyone use frames, I've since forgotten how to access elements in other frames... but I think... THINK... you ca go through page.frames("frameid") ... I think...
-tg
Re: [RESOLVED] integrating aspx page in html/php page with frames
Thanks for the answers.
I resolved it by changing the design of the frames page and putting all of the controls in the aspx page.