Avatar billede morphman Nybegynder
08. juli 2004 - 16:12 Der er 8 kommentarer og
1 løsning

Hvordan ser url'en så ud?

Got a link with: java script:Apply('font=verdana.ttf')

function Apply(q) {
    document.getElementById("all").style.visibility = "hidden";
    q = encodeURIComponent(q); q.replace("#", "%23");
    document.getElementById("apply").src = "edit_apply.php?q=" + q;
}

Me question for ye is, what will the outcommin' url of this function look like?

eks. edit_apply.php?q= *********** what next, please help.
Avatar billede morphman Nybegynder
08. juli 2004 - 20:32 #1
I hope ye understand what I mean :)
Avatar billede roenving Novice
09. juli 2004 - 08:39 #2
?-)

edit_apply.php?q=font%3Dverdana.ttf
Avatar billede morphman Nybegynder
10. juli 2004 - 01:35 #3
Nope, that's not it. (didn't work)...however, thank you for tryin' :)
Avatar billede squashguy Nybegynder
10. juli 2004 - 01:41 #4
<script>

Apply('font=verdana.ttf')

function Apply(q) {
    q = encodeURIComponent(q); q.replace("#", "%23");
    document.write("edit_apply.php?q=" + q);
}

</script>

gives: edit_apply.php?q=font%3Dverdana.ttf

so roenving is right..
Avatar billede roenving Novice
10. juli 2004 - 14:06 #5
>>morhman

-- and it's as simple as I put in a prompt-alert to show the value:

function Apply(q) {
    document.getElementById("all").style.visibility = "hidden";
    q = encodeURIComponent(q); q.replace("#", "%23");
    document.getElementById("apply").src = "edit_apply.php?q=" + q;
}

prompt('Linkvalue:',Apply('font=verdana.ttf'))
Avatar billede morphman Nybegynder
12. juli 2004 - 02:23 #6
Yeah, you know what, I think you are right. Well, I can't give ye points. so, please anwser. ohhh yeah, one more thing, could ye please be kind enough to show me how ye prompt thingy works..thanx.
Avatar billede roenving Novice
12. juli 2004 - 02:53 #7
Really sorry, 'cause I'm unable to find a link to enlighten you on the prompt-thing ...

I usually use the official Netscape guide, because it's comprehencial: http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/

But it lacks decent seeking-capabilities, so I'll recite my own guide (Javascript Bible !-)

NewVar = prompt("message", "defaultReply");

where message is an information you offer the user and the defaultReply is the value the user can change if he wants to !-)

U'r welcome '-)
Avatar billede morphman Nybegynder
12. juli 2004 - 21:53 #8
Okay, mate....thanx :)
Avatar billede roenving Novice
13. juli 2004 - 15:45 #9
-- og tak for point ;~}
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester