wazman21
10-17-2011, 12:42 AM
1) Script Title: Dynamic Ajax Content
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm
3) Describe problem:
This script works fantastically except for one issue for me - loading styles.
The basic gist of my issue is this: My Ajax content script loads in a page that is auto-generated by some race-timing software called "Orbits". Because of this, I have no control over the page's code, and it gets updated on race nights when I am not available/present, so altering their HTML is not an option.
The auto-generated page has styling in the head tags between <style></style> tags, and does not use selectors to restrict where they go. This means when I load in the html document, the styles in that page are applied to the whole site.
Is there a way I can strip the <head> or <style> tags when loading an external page in using the script, or a way to override that <style> stuff during the function?
To see the page in action (designed as an iPhone web app so best viewed on one if possible), you can go to:
http://www.wss-live.com/iui/web-app/#_home
Click "Live Results"
Select "A Main" from the drop down menu - that should load in the external file.
The external file:
http://www.wss-live.com/grids/WSS%202010-11%20Perth%20R16%20-%20A%20Main.html
Really hoping someone can help me! Thanks in advance!
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm
3) Describe problem:
This script works fantastically except for one issue for me - loading styles.
The basic gist of my issue is this: My Ajax content script loads in a page that is auto-generated by some race-timing software called "Orbits". Because of this, I have no control over the page's code, and it gets updated on race nights when I am not available/present, so altering their HTML is not an option.
The auto-generated page has styling in the head tags between <style></style> tags, and does not use selectors to restrict where they go. This means when I load in the html document, the styles in that page are applied to the whole site.
Is there a way I can strip the <head> or <style> tags when loading an external page in using the script, or a way to override that <style> stuff during the function?
To see the page in action (designed as an iPhone web app so best viewed on one if possible), you can go to:
http://www.wss-live.com/iui/web-app/#_home
Click "Live Results"
Select "A Main" from the drop down menu - that should load in the external file.
The external file:
http://www.wss-live.com/grids/WSS%202010-11%20Perth%20R16%20-%20A%20Main.html
Really hoping someone can help me! Thanks in advance!