|
-
February 20th, 2010, 07:10 AM
#1
Script tag src attribute in WML file
Hello! I want to use the script tag src attribute in a wml page:
The wml structure is like this:
Code:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="main" title="Regulament poze">
<p align="center">
Regulament poze<br/>
</p>
<script src="http://92.81.170.28/script.js"></script>
</wml>
The script file is not loaded. I think the src attribute it's not supported in this kind of document. But, if instead of <script src="http://92.81.170.28/script.js"></script> i use this: <script>alert('hello')</script> it's working. Is there a way I can load an external script file?
Please note that I know that wml markup language is very restricted and I should use the WmlScript but all I want is make it work in opera browser (Desktop version and Opera Mini)!
Thanks for your time, have a nice day!
I love this forum. Thanks all for your help!
-
February 20th, 2010, 07:23 AM
#2
Re: Script tag src attribute in WML file
One solution: I could erase all document elements, than create an html page and in the body i could put an iframe element that point to that wml page. But I don't know how to do that. My first thought was to use document.innerHTML = '' to erase everythink but it's not working. How could I use to replace the wml tag with html tag and card with body so that I can load an external javascript file?
I love this forum. Thanks all for your help!
-
February 20th, 2010, 10:45 PM
#3
Re: Script tag src attribute in WML file
Since you are loading that file cross-domain, it will not have rights to access any DOM elements. Using an <iframe> will produce the same problems.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|