Autor Beitrag
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Fr 25.05.07 20:52 
Tach! ;-)

Könnte mir jemand von euch behilflich sein und mir erklären, wie man per Javascript die frameBorder-Eigenschaft eines Inlineframes ändert?

Hab meiner Meinung nach alles Sinnvolle ausprobiert. Mach seit gestern nichts anderes. :-(

MfG,
WeBBy

PS: Seh grad nur ich keine Smilies im obrigen Beitrag?!

_________________
Steht der Bauer im Gemüse, hat er später grüne Füße.
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Fr 25.05.07 22:02 
Zeig mal, was du bis jetzt schon probiert hast.
Naja normalerweise läuft das doch in JS so, dass du document.irgendwas.frameBorder = '40' schreibst.
Bleibt die Frage, wie man genau den Inline-Frame anspricht. Zeig mal den entsprechenden HTML-Code.

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
WeBsPaCe Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Sa 26.05.07 13:21 
Tach.

user profile iconMarco D. hat folgendes geschrieben:
Zeig mal, was du bis jetzt schon probiert hast.

Zu viel. ;-)

user profile iconMarco D. hat folgendes geschrieben:
Naja normalerweise läuft das doch in JS so, dass du document.irgendwas.frameBorder = '40' schreibst.

Nun ja. Normalerweise. Zudem darf frameBorder nur die Werte 1 oder 0 bzw. yes oder no besitzen. 40 macht keinen Sinn.

user profile iconMarco D. hat folgendes geschrieben:
Bleibt die Frage, wie man genau den Inline-Frame anspricht. Zeig mal den entsprechenden HTML-Code.

Ist doch völlig wurscht, Beispiel:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
<iframe src="http://www.google.de"></iframe>
</body>
</html>


Danke für deine Antwort.

MfG,
WeBBy

_________________
Steht der Bauer im Gemüse, hat er später grüne Füße.
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Sa 26.05.07 13:28 
getElementById benutzt?

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Sa 26.05.07 13:29 
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
<iframe id='iframe' src="http://www.google.de"></iframe>
</body>
</html>

//JS:
//set ist boolean
function SetFrameBorder(set) {
   var frame = document.getElementById('iframe');
   if (set) {
         frame.frameBorder = 'yes';
   }
   else {
         frame.frameBorder = 'no';
   }
}

//Vlt. geht's es so auch
function SetFrameBorder(set) {
   document.getElementById('iframe').frameBorder = (int) set;   
}

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot


Zuletzt bearbeitet von Marco D. am Sa 26.05.07 13:31, insgesamt 1-mal bearbeitet
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Sa 26.05.07 13:31 
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>

<script type="text/javascript" language="javascript1.2">
<!--
function hideBorder()
{
  theFrame = document.getElementById("myIFrame");
  theFrame.frameBorder = "0";
}
//-->
</script>

</head>
<body>
<iframe id="myIFrame" src="http://www.google.de"></iframe>
<input type="button" onclick="hideBorder()" />
</body>
</html>


//edit: Die Antwort-Benachrichtigung funktioniert halt nur dann, wenn man auch im Editor ist ;-)

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
WeBsPaCe Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: So 27.05.07 20:31 
Tach.

Ich vergaß wohl zu sagen, dass ich eine Lösung für FF sowohl IE suche. :wink: Die beiden Lösungen (bzw. der eine Lösungsansatz; sind ja beide Lösungen recht ähnlich) hatte ich auch schon und führen bei mir im IE nicht zum gewünschten Erfolge. :-(

Bei euch etwa doch?!

MfG,
WeBBy

//EDIT: Jetzt erstma ne Woche Urlaub. Also postet schön, bis ich wieder da bin. :tongue:

_________________
Steht der Bauer im Gemüse, hat er später grüne Füße.
WeBsPaCe Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Mo 04.06.07 14:42 
Mhm, bin wieder da.

Hat keiner geantwortet, weil's bei niemandem geht? Ihr könnt mir ruhig auch schreiben, dass es bei euch so wie oben beschrieben auch nicht geht, dann komm ich mir nicht so blöd vor... ;-)

Auch das will nicht:
ausblenden Quelltext
1:
2:
3:
var iehack = document.createAttribute("frameborder");
iehack.nodeValue = "0";
document.getElementsByTagName("iframe")[0].setAttributeNode(iehack);


:-(

MfG,
WeBBy

_________________
Steht der Bauer im Gemüse, hat er später grüne Füße.
blackbirdXXX

ontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1077
Erhaltene Danke: 1

Ubuntu Dapper

BeitragVerfasst: So 17.06.07 11:14 
Probier node.style.borderWidth = '0px'; oder was auch immer du willst.

_________________
Klein, schwarz und ärgert Techniker? Jumper!
WeBsPaCe Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Mi 20.06.07 15:23 
Tach.

user profile iconblackbirdXXX hat folgendes geschrieben:
Probier node.style.borderWidth = '0px'; oder was auch immer du willst.


Was ist "node" bei dir? firstChild?! :nixweiss:

MfG,
WeBBy

_________________
Steht der Bauer im Gemüse, hat er später grüne Füße.
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: So 24.06.07 16:44 
blackbird meint wahrscheinlich den Node "iframe":

ausblenden Quelltext
1:
document.getElementById("myIFrame").style.borderWidth					
WeBsPaCe Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Di 26.06.07 20:05 
user profile iconHeiko hat folgendes geschrieben:
blackbird meint wahrscheinlich den Node "iframe":

ausblenden Quelltext
1:
document.getElementById("myIFrame").style.borderWidth					


Ooookay. Geht nicht. ;-)

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
<iframe src="http://www.google.de" id="myIFrame"></iframe>
<button onclick="document.getElementById('myIFrame').style.borderWidth = '0px';">Drück mich!</button>
</body>
</html>


:-(

MfG,
WeBBy

_________________
Steht der Bauer im Gemüse, hat er später grüne Füße.