FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WEBDEV 2024
→
How to... modify <BODY> tag?
How to... modify <BODY> tag?
Débuté par Yaroslav Alpizar, 25 fév. 2008 14:01 - 4 réponses
Connectez-vous…
Yaroslav Alpizar
#1
Posté le 25 février 2008 - 14:01
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!
Signaler
0
0
Yaroslav Alpizar
#2
Posté le 25 février 2008 - 16:31
Sorry for posting twice...
Signaler
0
0
Fabrice Harari
#3
Posté le 25 février 2008 - 16:48
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!
Signaler
0
0
Yaroslav Alpizar
#4
Posté le 26 février 2008 - 11:46
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...
Signaler
0
0
Yaroslav Alpizar
#5
Posté le 26 février 2008 - 12:00
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!
Signaler
0
0
→ Revenir à WEBDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte