Results 1 to 23 of 23

Thread: Location....Nowhere.

  1. #1
    chenko
    Guest
    I want to call a VBScript Sub thru a link so I use this code

    <A HREF="" onClick="vbscript:PopUp">

    I add HREF in to make it look like a link (and I wont just change the font and underline it 'cuz of CSS)
    but when I click the link it reloads the default page in that directory, what fo I use to make this do
    "nothing"

    And another Q.... How do i display HTML code on a web page?

    Thanks and Regards
    Simon

  2. #2
    Guest
    use something like this...
    &lt;/TABLE&gt;
    That will display </TABLE>

  3. #3
    Guest
    Cheers!

  4. #4
    Guest
    You might also want to try the <PRE></PRE> tags.....though I am not sure they will do what you want.

  5. #5
    Addicted Member Active's Avatar
    Join Date
    Jan 2001
    Location
    Lat: 13° 4' 46" N, Long: 80° 15' 20" E
    Posts
    209
    Originally posted by chenko
    I want to call a VBScript Sub thru a link so I use this code

    <A HREF="" onClick="vbscript:PopUp">

    Try this..

    <A HREF="vbscript:PopUp">Click Me to popup</A>
    If you can't beat your computer at chess, try kickboxing !!!
    [Download Tag Editing Tools.]

  6. #6
    Guest
    Originally posted by Active
    <A HREF="vbscript:PopUp">Click Me to popup</A>
    I get......

    " Type mismatch 'popup' "

  7. #7
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    You can do this:

    <a href="#" onClick="vbscript:PopUp">Click me</a>
    Alcohol & calculus don't mix.
    Never drink & derive.

  8. #8
    chenko
    Guest
    Havnt tried it yet but Cheers!

    Si

  9. #9
    Sadovod
    Guest

    display HTML code

    Here is neat chunk of code to do just that.

    <%
    Dim oFS, oStream, sText, sFileName
    Set oFS = Server.CreateObject("Scripting.FileSystemObject")
    sFileName = Request.ServerVariables("HTTP_Script")
    sFileName = ServerMapPath(sFileName)
    Set oStream = oFS.OpenTextFile(sFileName)
    sText = oStream.ReadAll()
    oStream.Close
    %>
    <html>
    <body>
    <pre>
    <%=sText%>
    </pre>
    </body>
    </html>

  10. #10
    anoop007
    Guest
    what was that??.. ASP?

  11. #11
    anoop007
    Guest
    and Simon.. why won't you use CSS??.. started hating CSS,bcoz of me? :P

  12. #12
    chenko
    Guest
    Huh? CSS? how can I use that for what I want?

    And yes it is ASP Anoop, but mind me saying, that code was a waste of space!


    Wynd: The # sorta works, but I moves it to the top of the page

    Is there anyother way I can do this?

  13. #13
    anoop007
    Guest
    <a href = "javascript:void()" onClick = "popICQ">

  14. #14
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    Yeah, what anoop said, try this:

    <a href="javascript:void(0)" onClick="vbscript:PopUp">
    Alcohol & calculus don't mix.
    Never drink & derive.

  15. #15
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    Seems like there is something sticking a space in there...
    Alcohol & calculus don't mix.
    Never drink & derive.

  16. #16
    chenko
    Guest

    Thumbs up

    Originally posted by anoop007
    <a href = "javascript:void()" onClick = "popICQ">
    Cheeky bugger, You had to show off an post It to didnt you!!

    Cheers!

  17. #17
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    i think you have to send it 0 like Wynd said though. Becausing voiding 0 does nothing.

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  18. #18
    chenko
    Guest
    Its works with out the Zero anyways


    Cheers guys!

  19. #19
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    Thats cool, i did not know that

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  20. #20
    hellswraith
    Guest
    I found another way to display HTML code on your page, if you are using ASP, you can do this:

    <%=Server.HTMLEncode("<table>")%>

    It will embed it as &lt;table&gt; in your HTML, resulting in the display of <table>.

  21. #21
    anoop007
    Guest
    Originally posted by chenko


    Cheeky bugger, You had to show off an post It to didnt you!!

    Cheers!
    Poor me!! just 170 odd posts.. hehe

  22. #22
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    In javascript, you can "return false" to the onClick event to process script without processing the link.
    Code:
    <a href="page.html" onClick="return MyFunction()">Boost Your Post Count</a>
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  23. #23
    chenko
    Guest
    Well its not a function and Ive got it sorted

    Thanks all!!


    ......Why do all my questions suddenly appear at the top making me look like a dumb ass! ??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width