Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
js parsing problem

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side
View previous topic :: View next topic  
Author Message
budha



Joined: 02 Mar 2004
Posts: 1377
Location: Osijek

PostPosted: 12.02.2005 20:22    Post subject: js parsing problem Add user to your forum ignore list Reply with quote

code je:
Code:
<script language="JavaScript" type="text/JavaScript">
document.write('<a href="mailto:?subject=Članak sa Grincajg.org&body='+window.location.href+'"><img src="pic/icons/mail.gif">pošalji</a>');
</script>


e sad, radi dok je trenutni href tipa:
http://www.bla.com/stranica.htm

ali problemi nastaju kada je tipa:
http://www.bla.com/stranica.htm?par1=nesto&par2=nesto

e-mail client mi u message body stavlja samo do &, dakle:
http://www.bla.com/stranica.htm?par1=nesto

any ideas?

thx

_________________
I hate to advocate drugs, alcohol, violence, or insanity to anyone, but they've always worked for me.
Back to top
View user's profile Send private message Visit poster's website
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 12.02.2005 22:53    Post subject: Re: js parsing problem Add user to your forum ignore list Reply with quote

pa evo vidi što će biti u tvom slučaju:
Quote:
<a href="mailto:?subject=Članak sa Grincajg.org&body=www.bla.com/stranica.htm?par1=nesto&par2=nesto">

valjda si sad skužio da on misli da je par2 još jedna varijabla kao subject i body

prvi ampersand (crveni) je delimiter za varijable a drugi (zeleni) je samo tekst u body-u ali problem je to što on to smatra još jednim delimiterom Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
che.UP
mi3.crew


Joined: 07 Sep 2003
Posts: 2320
Location: zagreb

PostPosted: 13.02.2005 00:28    Post subject: Re: js parsing problem Add user to your forum ignore list Reply with quote

budha wrote:
code je:

any ideas?



Code:
<script type="text/javascript">
document.write('<a href="mailto:?subject=Članak sa Grincajg.org&body='+escape(window.location.href)+'"><img src="pic/icons/mail.gif">pošalji</a>');
</script>


language atribut ti je nepotreban.
moras eskejpat window.location.href pa ce radit.
btw ovo sa subject i body ne radi bas sa svim mail readerima kolko se sjecam i na ovaj nacin nisi siguran da li ce taj link i doci do osobe kojoj je namijenjen posto se oslanjas na to da korisnik mora imat podesen neki email account da bi mogao uspjesno poslat link.

_________________
UP | TypeTester | Accommodations App
Meni u Firefox-u ne radi AJAX
Back to top
View user's profile Send private message Visit poster's website
budha



Joined: 02 Mar 2004
Posts: 1377
Location: Osijek

PostPosted: 14.02.2005 10:31    Post subject: Add user to your forum ignore list Reply with quote

@sulien: hvala sto si me toliko prosvjetlio, pa sad znam da se par1 i par2 (skraceno od parametar 1 i parametar 2) jos zovu i varijable rrrrrrrah
@che: e, to mi je trebalo... thx!

_________________
I hate to advocate drugs, alcohol, violence, or insanity to anyone, but they've always worked for me.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group