Jump to content


Photo

Inserir Texto Dentro De Uma Tag Div


  • Faça o login para participar
15 replies to this topic

#1 jgcl

jgcl

    João Gabriel C. Laass, Serra/ES

  • Usuários
  • 559 posts
  • Sexo:Não informado
  • Localidade:Serra / ES
  • Interesses:Tudo!

Posted 08/05/2005, 21:14

Olá pessoal!

Continuo eu desenvolvendo meu jogo da velha multiplayer...

seguinte:

Tenho uma página principal e uma iframe dentro dela.

Essa iframe fica dando refresh, e, num determinado momento, chega um java script que tem que inserir o seguinte texto dentro da tag "DIV" que está na página principal: "jogador1".

id da tag div -> "oponente".

Eu tentei usar isso:

<script>opener.oponente.innerHTML = "jogador1";</script>

Porém não congui....

Alguma sugestão/resposta??
João Gabriel
Site >> joaogabriel.org
CGiClube.net >> http://www.cgiclube.net
Vitória Perl Mongers >> http://vitoria.pm.org

#2 felipecm

felipecm

    Expert

  • Usuários
  • 541 posts
  • Sexo:Não informado
  • Localidade:ABC / SP

Posted 08/05/2005, 22:00

Olá pessoal!

Continuo eu desenvolvendo meu jogo da velha multiplayer...

seguinte:

Tenho uma página principal e uma iframe dentro dela.

Essa iframe fica dando refresh, e, num determinado momento, chega um java script que tem que inserir o seguinte texto dentro da tag "DIV" que está na página principal: "jogador1".

id da tag div -> "oponente".

Eu tentei usar isso:

<script>opener.oponente.innerHTML = "jogador1";</script>

Porém não congui....

Alguma sugestão/resposta??

Hmm.. tenta algum parent .. ou algo do tipo...

parent.document.getElementById("NomeDoDiv").innerHTML = "..."

Edição feita por: felipecm, 08/05/2005, 22:00.

MCAD, MCP

#3 jgcl

jgcl

    João Gabriel C. Laass, Serra/ES

  • Usuários
  • 559 posts
  • Sexo:Não informado
  • Localidade:Serra / ES
  • Interesses:Tudo!

Posted 08/05/2005, 22:19

ja tentei....
João Gabriel
Site >> joaogabriel.org
CGiClube.net >> http://www.cgiclube.net
Vitória Perl Mongers >> http://vitoria.pm.org

#4 Alex Hiroshi

Alex Hiroshi

    Super Veterano

  • Ex-Admins
  • 4923 posts
  • Sexo:Masculino
  • Localidade:São Paulo - SP

Posted 08/05/2005, 22:58

parent.NomeDoIframe.document.getElementById('IdDiv').innerHTML='XXXXX'"

Fórum WMO - Equipe de Desenvolvimento / Banco de Dados - Ex-Administrador

#5 jgcl

jgcl

    João Gabriel C. Laass, Serra/ES

  • Usuários
  • 559 posts
  • Sexo:Não informado
  • Localidade:Serra / ES
  • Interesses:Tudo!

Posted 09/05/2005, 16:04

parent.NomeDoIframe.document.getElementById('IdDiv').innerHTML='XXXXX'"

não é pro iframe, e sim a página que cotém o código do iframe...
João Gabriel
Site >> joaogabriel.org
CGiClube.net >> http://www.cgiclube.net
Vitória Perl Mongers >> http://vitoria.pm.org

#6 jgcl

jgcl

    João Gabriel C. Laass, Serra/ES

  • Usuários
  • 559 posts
  • Sexo:Não informado
  • Localidade:Serra / ES
  • Interesses:Tudo!

Posted 09/05/2005, 18:08

Melhorando minha explicação:

index.html
<div id="jogador"></div>
<iframe src="script.html" name="script" width="0" height="0" frameborder="0" scrolling="no"></iframe>

script.html
<script>opener.oponente.innerHTML = "Gabriel";</script>


Explicando...

Quando eu abrir a página "index.html" ela vai carregar a página "script.html" dentro de uma "iframe". Logo, quando essa "iframe" for executada, ela teria que gravar na "div" da página "index.html" o nome "Gabriel".

O problema é que isso não aconteçe!...

Alguém sabe o código correto???
João Gabriel
Site >> joaogabriel.org
CGiClube.net >> http://www.cgiclube.net
Vitória Perl Mongers >> http://vitoria.pm.org

#7 Alex Hiroshi

Alex Hiroshi

    Super Veterano

  • Ex-Admins
  • 4923 posts
  • Sexo:Masculino
  • Localidade:São Paulo - SP

Posted 09/05/2005, 21:25

Entendi, então é como foi postado ali em cima pelo Felipe..
<script>
parent.document.getElementById('IdDaDiv').innerHTML='o que vai inserir';
</script>

Fórum WMO - Equipe de Desenvolvimento / Banco de Dados - Ex-Administrador

#8 jgcl

jgcl

    João Gabriel C. Laass, Serra/ES

  • Usuários
  • 559 posts
  • Sexo:Não informado
  • Localidade:Serra / ES
  • Interesses:Tudo!

Posted 12/05/2005, 18:58

valeu!! =D
João Gabriel
Site >> joaogabriel.org
CGiClube.net >> http://www.cgiclube.net
Vitória Perl Mongers >> http://vitoria.pm.org

#9 LarPhozyHah

LarPhozyHah

    Super Veterano

  • Usuários
  • 14515 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 21/09/2017, 02:44

Venta Viagra Barata cialis Real Provera For Sale Discount Viagra Spedizione Europa Comprare Viagra On Line Italia cialis Propecia Testicle Pain
Clomid cialis Kamagra Viagra Levitra
Can Buy Nootropil
Sobredosis De Propecia <a href=http://cialtobuy.com>cialis online</a> Cialis Generico Miglior Prezzo

#10 LarPhozyHah

LarPhozyHah

    Super Veterano

  • Usuários
  • 14515 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 28/09/2017, 12:05

Buying Cialis In Ireland Propecia Online Review online pharmacy Buy Disulfiram Fastest Levitra Home Delivery
Plavix Buy Usa Buy Xenical Orlistat Canada Alli Canadian Pharcharmy Online cialis Order Cheap Propecia What Dose Of Propranolol Should L Take Is Amoxicillin Effective For Abcesses

#11 LarPhozyHah

LarPhozyHah

    Super Veterano

  • Usuários
  • 14515 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 08/10/2017, 12:37

Cephalexin Rimadyl Mix order levitra at walmart Cialis Sale Generic Viagra 50 Mg Cheap For Sale Get Prednison Overcounter
Lowest Price Viagra 100 Mg viagra Online Lasix Generic
Puedo Tomar Cialis Y Alcohol online pharmacy Pages Jaunes Levitra Cialis Viagra Confronto Direct Legally Doryx Pills By Money Order Visa

#12 Miguceamma

Miguceamma

    MiguPenjisse

  • Usuários
  • 13201 posts

Posted 08/10/2017, 22:40

Order Xenical By Mail Cod Generic Finasteride Cialis Dolor De Piernas cialis Generique Amoxicillin Remede Tarif En Pharmacie Jessicas Center Progresso Mexico
Propecia Prix Prix Propecia Pas Cher Isotretinoin Discount buy viagra online Sale Generic Free Shipping Clobetasol 50 Mg Di Sildenafil
Kamagra Jelly 100 Mg Toulon viagra Natural Amoxicillin Amoxicillin Sensitive To Sunlight Occasion Levitra
Amoxicilina Medicine Internet Pharmacy Mastercard Accepted buy cialis Order Xenical Generic Online
Canadian Pharmacys Efficacia Propecia 5 Alfa Reduttasi viagra online prescription Propecia 1mg 20mg

#13 LarPhozyHah

LarPhozyHah

    Super Veterano

  • Usuários
  • 14515 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 03/11/2017, 10:14

Meronem Viagra 25mg Ch generic levitra no prescription Cialis From Usa Discount On Line Finasteride
Cialis Canada No Prescription Sexual Risks Propecia Acne Buy Low Price cheapest brand name levitra Risque Achat Viagra En Levallois Propecia He Impotencia
Pharm Online why is levitra so expensive Cialis Per Posta Dutasteride Dutasteridum

#14 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 03/11/2017, 19:07

Mail Order Amoxicillin Mexico Propecia With Minoxidil Baldness online pharmacy Buy Colchicine Tablets Zithromax Take With Food Cephalexin Allergy
Viagra Online Canadiain Levitra Interazioni online pharmacy Aurochem Viagra Review Buy Levitra Safely From Canada

#15 LarPhozyHah

LarPhozyHah

    Super Veterano

  • Usuários
  • 14515 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 01/12/2017, 03:02

Cystitis Keflex Levitra Generic Lowest Prices Doxycycline Secure Ordering Overseas cialis, viagra levitra Kamagra Manufacturers Comprar Cialis Andorra Precio Amoxicillin Sinus Infection
Hydrocortisone Cheapest Canadian Generic Cialis viagra 272 Can I Trust Canadian Viagra Online Acquistare Viagra Cialis Pharmacy Online Cefalosporin
Amoxicillin Dosage For 45 Pound Child Prescription Free 2 5 Next Day Viagra viagra Cialis Langzeittherapie




0 user(s) are reading this topic

0 membro(s), 0 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq