Hi
Ich habe ein seltsames Phänomen.
In meiner Ext wird ein Bookmarklink generiert.
Diese Funktion ist ein JS das in der Ext reingeladen wird.
Das komische ist jetzt nun das lokal auf ner 4.2 alles sauber läuft.
Nur Online auf ner 4.1.1 hat er Probleme mit gequoteten Anführungszeichen.
lokales generiertes JS
if (document.all && !window.opera){ //IE5+6
document.write("<a href="\" javascript:windowexternaladdfavorite="" p_url="" p_title="">" + p_description + "</a>");
}else if ((typeof window.sidebar == 'object') && (typeof window.sidebar.addPanel == 'function')){ //Gecko
document.write("<a href="\" javascript:windowsidebaraddpanel="" p_title="" p_url="" title="\">" + p_description + "</a>");
}else{
document.write("<a href="\" p_url="" title="\" p_title="" rel="\" sidebar="">" + p_description + "</a>");
}
Online generiertes JS
if (document.all && !window.opera){ //IE5+6
document.write("<a href="\" javascript:windowexternaladdfavorite="" p_url="" p_title="">" + p_description + "</a>");
}else if ((typeof window.sidebar == 'object') && (typeof window.sidebar.addPanel == 'function')){ //Gecko
document.write("<a href="\" javascript:windowsidebaraddpanel="" p_title="" p_url="" title="\">" + p_description + "</a>");
}else{
document.write("<a href="\" p_url="" title="\" p_title="" rel="\" sidebar="">" + p_description + "</a>");
}
Da scheint kein Unterschied zu sein.
Original JS-Code vor generierung
if (document.all && !window.opera){ //IE5+6
document.write("<a href="\"javascript:window.external.addFavorite('"" p_url="" p_title="">" + p_description + "</a>");
}else if ((typeof window.sidebar == 'object') && (typeof window.sidebar.addPanel == 'function')){ //Gecko
document.write("<a href="\"javascript:window.sidebar.addPanel" p_title="" p_url="" title="\""">" + p_description + "</a>");
}else{
document.write("<a href="\""" p_url="" title="\""" p_title="" rel="\"sidebar\"">" + p_description + "</a>");
}
Lokal JS write
<a title="Websitename" href="javascript:window.sidebar.addPanel ('Websitename', 'http://localhost:8508/index.php?id=406&no_cache=1','');">> Bookmark this!</a>
Online JS write kommt nix nur ein Fehler
Fehler: illegal character
Quelldatei: http://www.kunde.de/index.php?id=8&L=0
Zeile: 173, Spalte: 29
Quelltext:
document.write("<a href="\" javascript:windowexternaladdfavorite="" p_url="" p_title="">" + p_description + "</a>");
Habe es lokal mit/ohne Frames und mit/ohne TV getestet.
Da tuts bei allen wunderbar
Warum hat er bei ner 4.1.1 nen Problem mit den Quotes?
Danke und Gruß
Danton