Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript] wypelnienie pola input w iframe
JanuszTracz
post
Post #1





Grupa: Zarejestrowani
Postów: 25
Pomógł: 0
Dołączył: 26.02.2009

Ostrzeżenie: (0%)
-----


Witam.

Mam pytanie. Da sie zrobic tak:

mam strone z buttonem i ponizej iframe do strony "strona2.htm", ktora zawiera pole input

i teraz zeby jak klikne ten button to pole bedzie mialo wartosc "test"



prosze o szybka odpowiedz, pozdrawiam,

Janusz Tracz
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 8)
Fifi209
post
Post #2





Grupa: Zarejestrowani
Postów: 4 655
Pomógł: 556
Dołączył: 17.03.2009
Skąd: Katowice

Ostrzeżenie: (0%)
-----


Spróbuj z
document.getElementById('tutaj_id');
Go to the top of the page
+Quote Post
JanuszTracz
post
Post #3





Grupa: Zarejestrowani
Postów: 25
Pomógł: 0
Dołączył: 26.02.2009

Ostrzeżenie: (0%)
-----


nie dziala;/
Go to the top of the page
+Quote Post
Fifi209
post
Post #4





Grupa: Zarejestrowani
Postów: 4 655
Pomógł: 556
Dołączył: 17.03.2009
Skąd: Katowice

Ostrzeżenie: (0%)
-----


To pokaż jak próbowałeś ?
Go to the top of the page
+Quote Post
JanuszTracz
post
Post #5





Grupa: Zarejestrowani
Postów: 25
Pomógł: 0
Dołączył: 26.02.2009

Ostrzeżenie: (0%)
-----


plik test1.htm:

  1. <input type="button" onclick="document.getElementByid('test').value = 'test';" value="go">
  2.  
  3.  
  4. <iframe width="300" height="200" frameborder="0" src="test2.htm"></iframe>





plik test2.htm:

  1. <input type="text" id="test">
Go to the top of the page
+Quote Post
Spawnm
post
Post #6





Grupa: Moderatorzy
Postów: 4 069
Pomógł: 497
Dołączył: 11.05.2007
Skąd: Warszawa




nie document.getElementByid('test') tylko document.getElementById('test')
literówka (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
JanuszTracz
post
Post #7





Grupa: Zarejestrowani
Postów: 25
Pomógł: 0
Dołączył: 26.02.2009

Ostrzeżenie: (0%)
-----


rzeczywiscie:P dzieki wielkie



rozumiem, ze oba pliki musza byc w jednym katalogu? nie mozna tak zrobic ze jeden na innym serwerze?;/
Go to the top of the page
+Quote Post
Fifi209
post
Post #8





Grupa: Zarejestrowani
Postów: 4 655
Pomógł: 556
Dołączył: 17.03.2009
Skąd: Katowice

Ostrzeżenie: (0%)
-----


Spróbuj to się dowiesz. (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg) Jeżeli masz go w ramce a teraz działa to powinno śmigać.
Go to the top of the page
+Quote Post
JanuszTracz
post
Post #9





Grupa: Zarejestrowani
Postów: 25
Pomógł: 0
Dołączył: 26.02.2009

Ostrzeżenie: (0%)
-----


nie chce dzialac;/
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 25.08.2025 - 12:07