Results 1 to 9 of 9

Thread: javascript & Compatibilty

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2009
    Posts
    150

    Angry javascript & Compatibilty

    hi vbforums

    how would i call a javascript file that will automatically put in the code in the url combobox and it will press enter automatically ?

    And

    How Would i Make my Application Compatible with vista and xp at the moment its built for windows 7 but if i get to xp and vista i would need to disable a windows 7 feature so it will work on xp and vista please tell me

    thanks a lot

    pillhead2007

  2. #2
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    519

    Re: javascript & Compatibilty

    Okay, first of all, do you want to load the contents of a javascript file into a combobox on your application and automatically press it?

    Well use IO.File.ReadAllText()
    And to press the combobox, you can raise the ComboBox_Enter event.

    Secondly, you can try to find a replacement for that code so it works on all OSes or you can disable it by doing a check like this:
    Code:
    My.Computer.Info.OSFullName.Contains("7")
    Im not sure though, what the full OS name of Windows 7 contains.

  3. #3
    Member Cyrax.NET's Avatar
    Join Date
    Feb 2007
    Posts
    54

    Re: javascript & Compatibilty

    how do you mean put a javascript file code into a combobox?

    do you mean, call a javascript method in a webpage? do you mean put the url returned by the javascript method into IE URL combobox? your own combobox?

    again your not clear about windows 7. what feature would you need to disable? what are you doing in windows 7 that vista/xp don't have?

  4. #4
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: javascript & Compatibilty

    Quote Originally Posted by Zeelia View Post
    Okay, first of all, do you want to load the contents of a javascript file into a combobox on your application and automatically press it?

    Well use IO.File.ReadAllText()
    And to press the combobox, you can raise the ComboBox_Enter event.

    Secondly, you can try to find a replacement for that code so it works on all OSes or you can disable it by doing a check like this:
    Code:
    My.Computer.Info.OSFullName.Contains("7")
    Im not sure though, what the full OS name of Windows 7 contains.
    There's a CodeBank entry for identifying the OS. It's more in-depth than that and provides a little more stability.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  5. #5
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    519

    Re: javascript & Compatibilty

    Quote Originally Posted by weirddemon View Post
    There's a CodeBank entry for identifying the OS. It's more in-depth than that and provides a little more stability.
    Yeah I found it some time ago, forgot to mention it in the post.

    However I just want to say that if you are trying to load a javascript method into a webbrowser, depending on what you want to do, you might need to add void 0 to the method, to prevent that the javascript method changes the site into the methods value.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jul 2009
    Posts
    150

    Re: javascript & Compatibilty

    yes i need the javascript to be called in a webpage and windows 7 features taskbar progress bar i would have to disable that for it to work in xp or vista

  7. #7
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    519

    Re: javascript & Compatibilty

    Why would you have to disable that?
    All webbrowsers have progress bars in their taskbars.

    Besides, you are developing in .NET, installing the required framework should solve the problem.

    However, to call a javascript in a webpage, depending on what you want to do, you could do like this:
    WebBrowser1.Navigate("javascript:alert('Hello World!'); void 0;")

    That will load the javascript javascript:alert('Hello World!') into the webbrowser.

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Jul 2009
    Posts
    150

    Re: javascript & Compatibilty

    in windows 7 the actual taskbar is progress bar i would have to disable the feature i have made for my web browser so it would work with xp and vista

  9. #9
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    519

    Re: javascript & Compatibilty

    Okay, I've basically already given you the code that you need to disable it.
    If you want a more ingoing code and more exact code, take a look at this:
    http://www.vbforums.com/showthread.php?t=434149

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