PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WEBDEV 2024
→
How to... modify <BODY> tag?
How to... modify <BODY> tag?
Started by Yaroslav Alpizar, Feb., 25 2008 2:01 PM - 4 replies
Connect yourself…
Yaroslav Alpizar
#1
Posted on February, 25 2008 - 2:01 PM
Hello everyone... I'm trying to add the following line to the body tago f a page:
<script SRC="/user/res/wz_tooltip.js"></script>
But cannot find how to modify the body tag of the html page...need help ASP...thanks!
Report
0
0
Yaroslav Alpizar
#2
Posted on February, 25 2008 - 4:31 PM
Sorry for posting twice...
Report
0
0
Fabrice Harari
#3
Posted on February, 25 2008 - 4:48 PM
Hi Yaroslav
In the advanced tab of the page description, you can define external JS
files... You can also add html code directly, but int hat case, it
shouldn't be necessary
Best regards
--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting
More information on
http://www.fabriceharari.com
Yaroslav Alpizar wrote:
Hello everyone... I'm trying to add the following line to the body tago f a page:
<script SRC="/user/res/wz_tooltip.js"></script>
But cannot find how to modify the body tag of the html page...need help ASP...thanks!
Report
0
0
Yaroslav Alpizar
#4
Posted on February, 26 2008 - 11:46 AM
Thanks Fabrice...but I've already tried that. In the advance tab you can add html code to the HEADER and not to the BODY or at least is what I understand from what I've tested. I'm trying to change the BODY dinamically using a jscript function like this one:
function Change_body(){
var script = document.createElement('script');
script.src = 'wz_tooltip.js';
script.defer = true;
var body = document.getElementsByTagName('BODY');
body.appendChild(script);
}
But I got this error when executing: "Object does not accept this method or property"
I guess that appendchild(script) does not works with body but according to MSDN the body object accepts this method. I tried also with insertAdjacentElement and insertbefore but same answers...
In the end I just want to show a tooltip when moving the mouse over an image and show some specific data. Any tip to do this?
Thanks again...
Report
0
0
Yaroslav Alpizar
#5
Posted on February, 26 2008 - 12:00 PM
Problem solved! Some small corrections on the jscript function:
function Change_body(){
var myscript = document.createElement('script');
myscript.src= 'wz_tooltip.js';
document.body.appendChild(myscript);
}
Thanks!
Report
0
0
→ Go back to WEBDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text