GetURL question

I am using two buttons with a getURL function. The
actionscript is set to open the url in a new browser window, which
works, however, when I have opened one of the URL's in a new
browser window, the second one opens in that same window, instead
of opening another window. Is there a way around this ? The code I
use is something like this:
forum.btn onRelease = function(){
getURL("url","_blank")
and
webwinkel.btn onRelease = function(){
getURL("url","_blank")
Any help appreciated. T.I.A.

Use different window names....
e.g. change the second button to :
webwinkel.btn onRelease = function(){
getURL("url","_blank2")
}

Similar Messages

  • Simple question about getURL

    Newbie here...I'm trying to stop an animation from repeating and have a button get a URL. Should be simple but having trouble. Please help.
    Last frame in actions layer : stop();
    Button layer last frame has the following:
    learnmore_btn.addEventListener(MouseEvent,CLICK;getURL("http://www.xxxxxxx");
    function getURL(event:MotionEvent):void
        "http://www.xxxxxxxx".getURL();

    getURL is an AS2 function name, so you are better off not using anything by that name.  In AS3 navigateToURL is used to link to new pages.
    Beyond that, your code is just wrong in a variety of ways--too many to go thru.  The event listener should specify the event type and the name of the event handler function to call.  The event handler function should incorporate the linking code needed.
    learnmore_btn.addEventListener(MouseEvent.CLICK, linkLearnMore);
    function linkLearnMore(event:MouseEvent):void
       navigateToURL(new URLRequest("http://www.xxxxxxxx"));  // linking code

  • Question about getURL working with html frame

    My page has two parts, the left part is the
    "link" part, and the right part shows what it links. It's
    name is "right".
    usually, i just use <a href="newpage.htm"
    target="right">link</a>.
    Now, I use the left part as Flash.
    As you know in Flash, getURL("./newpage.htm", "right"), it
    does the same thing
    and it works very well.
    Next, I put some # mark in the newpage. which means if u type
    newpage.htm#1
    then it goes to the first part of that page and /#2 goes to
    the second.
    Now, If you use <a href="newpage.htm#2" target="right">
    , it works perfectly.
    It loads the newpage on the right frame and goes to #2
    directly.
    Now let's try Flash, I use getURL("./newpage.htm#2",
    "right"),
    But, It doesn't work for the # sign! It only loads the page
    but not goes to #2.
    Someone would help me? Thanks a lot

    Hi,
    1.Place your .PDF file under the resources folder of our project.
    2. Specify the path of the file in the value of the Hyperlink.
    <h:outputLink binding="#{Page1.hyperlink1}" id="hyperlink1" style="left: 240px; top: 216px; position: absolute" value="resources/abcd.pdf">
    Regards.

  • Questions URLScrapter provider

    I did a CustomURLScrapter provider to demo the the URLScraper provider according to the development guide, I am able to see the custom channel from the desktop, but the content is empty, I set the url pool at the display profile as:
    <Collection name="urlPool">
    <String value="http://msuc-03.canada.sun.com:80"/>
    </Collection>
    So my first question is what the content supposed to be?
    I used System.out.println to print out the URL in the overrided method getURL() of URLScraperProvider, but where can I see the printout from the log?
    Thanks

    Hi,
    You should see a site�s content inside your channel. That if you�ve configured properly the url and other things, such as the url in the locale the user is visiting the portal. There are many url�s, depending on the language. Be sure only that one is taking part. You also need to configure yous O.S. so that it is able to "see" that url. go to the admin. guide to configure that. If you�ve created a new provider you need to include the .properties file in the correct folder.
    good luck, Pablo.

  • Questions on Iframes and PAR structures

    Hi,
    I have a few questions on Iframes, JSP's and PAR structure for Portal Application Projects in NWDS.
    1. Can I change the source of an iframe from one jsp to another instead of one html to another.
    2. My Jsp's are in Portal-Inf/pagelet because whenever I add a new JSP I add a new Portal application object. So how do you refer to the relative path in the calling JSP. e.g <iframe name = "myframe" src ="<relative path>BlankPage.jsp" width="100%">. What would be the relative path. I tried pagelet\jspname.jsp but it does not work.
    3. In general how do you type the relative path for objects in a PAR project structure?

    Hi Prem,
    1.Yes,you can.
    2.You dont have to,you can copy and paste as many as Jsp's inside the pagelet.I use beans to customize the BHTML UI properties.So you can make your IFRAME source tag as variable.
    <iframe
         id="Nedbrowser"
         name="Nedbrowser"
         style="relative"
         width="<%=myBean.getFrameWidth()%>"
         height="<%=myBean.getFrameHeight()%>"
         frameborder="yes"
         marginheight="0"
         marginwidth="0"
         scrolling="yes" 
         src="<%=myBean.getUrl()%>">
    </iframe>
    Your approach of setting relative path wont work as it is.You have to do something more
    1. in JSP you have to use a import statement like
    <%@ page import="com.sapportals.portal.prt.resource.IResource" %>
    <% IResource rs = componentRequest.getResource(IResource.JSP , "pagelet/BalnkPage.jsp");  %>
    and in the IFRAME tag you can do something like this
    <iframe
         id="Nedbrowser"
         name="Nedbrowser"
         style="relative"
         width="300"
         height="400"
         frameborder="yes"
         marginheight="0"
         marginwidth="0"
         scrolling="yes" 
         src="">
    </iframe>
    <% Nedbrowser.setSrc(rs.getResourceInformation().getURL(componentRequest)); %>
    3.There are so many forum pages on this matter.Just go ahead and search for IResource in SDN.
    Goodluck
    regards
    Senthivel

  • GETURL  is not working in flash player 9.0.124.0.

    Dear Friends,
    My swf and my html are in different domain so i got a issue
    in GETURL function , It is not working in flash player 9.0.124.0.
    in IE browser so that i add one parameter like allowScriptAccess
    =always then its working fine.but my question is what will happed
    if they will introduce any new flash version in future please tell
    me what is the permanent solution for this issue.
    Thanks

    There is no way to know what will change in the future. This
    is the solution that works now. It will probably remain in place
    for the reasonable future.

  • FLASH MX 2004 action script question

    Hi!
    I need to create an script for a basic function; when mouse goes over a moveclip, that works also link, I want it to trigger an invisible red dot on a nerby map. I have created a movieclip and named it "red", it's a 1 sec clip with nothing in the beginning and a red dot in the end. I want this dot to trigger and show only when mouse goes over this specific link, otherwise it must be invisible.
    I know this is pretty basic stuff and I have done this before few years back but I have forgotten how to do it and need help now.
    Any help would be very much appreciated :-)
    Kim

    I still need help, this problem is little more complicated;
    I can manage making the red dot visible and invisible by triggering roll over and roll out on a button.
    The problem is, I have a navbar which is line of flags made to a movie clip, with 5 invisible buttons. These buttons are configured to do three different actions; get URL, trigger a light effect and a movement effect.
    Now I need this invisible button to trigger my red dot also so that when mouse is over a certain flag a red dot appears on a map on the correct location.
    I have the red dot on a new layer. It has instance name "redDot" and on the very first frame of this red button layer, I have action script that says: redDot._visible = false;
    This works as it should and the dot is invisible when the movie has loaded.
    I need to make this invisible button to trigger the visibility of my red dot, and I have tried to add the code:
    on (rollOver) {
    redDot._visible = true;
    on (rollOut) {
    redDot._visible = false;
    to this invisible button, but it dosent work, furthermore it affects the other functions of the button/movie clip, which were working fine before.
    Here is the code attached to this invisible button so far:
    on (release) {
    getURL(/:url1);
    on (rollOver) {
    gotoAndPlay(2);
    on (rollOut) {
    gotoAndPlay("sec");
    I have the URL:s on an external text file.
    So my question is; where do I add the action script to make it visible when moving the mouse over this invisible button? To my understanding, it should go in the same place as the other code that is working, but I'm doing something wrong...
    I tried to do this:
    on (release) {
    getURL(/:url1);
    on (rollOver) {
    gotoAndPlay(2)
            redDot._visible = true;
    on (rollOut) {
    gotoAndPlay("sec")
    redDot._visible = false;
    But it is wrong, I also tried like this:
    on (release) {
    getURL(/:url1);
    on (rollOver) {
    gotoAndPlay(2);
    on (rollOut) {
    gotoAndPlay("sec");
    on (rollOver) {
    redDot._visible = true;
    on (rollOut) {
    redDot._visible = false;
    But it makes the other functions that worked to stop working.
    I also tried to give the invisible button an instance name and do it like this:
    invisible.on (rollOver) {
            redDot._visible = true;
    invisible.on (rollOut) {
    redDot._visible = false;
    And put them in the actions layer of button movie clip but nothing works.
    Flash is really giving me a headache now...
    To conclude, I made a simple test button, put it on the scene somewhere and and attached the rollOver and rollOut codes, targeting the "redDot" and it works fine, the button didn't need a instance name to work. I don't understand why I can't make it to work with the invisible button where it should be.
    I hope this clarifies the point and I can get some help with this and sorry for bothering again with this problem.
    Oh and I use old Flash MX 2004.
    Thanks
    Kim

  • Can you pass more than on variable with getURL in flash form

    I needed to call another page from inside a form not with the submit button and fournd this piece of code
    <cfinput type="button" id="btEdit" name="btEdit" value="View" onClick="getURL('../../forms/Program_populate.cfm?<cfoutput>#SESSION.URLToken#</cfoutput> &Reference='+data.dataProvider[data.selectedIndex]['ID'],'_blank')" >
    "Reference" is passed in the URL, I have tried to tweek this to pass an additional field "ID" , Vendor_Number" , but have been unable to find the correct syntax.  If anyone can help that would be great.
    Thanks,
    Mike

    url variables are passed as follows
    after the file name a question mark (?) then,
    name=value with an ampersand (&) between name value pair
    You may be having problems with escaping the action script code.
    If the value is a coldfusion value just cfoutput the value as in your example.
    If the value is from a form element then you need to escape it as in the example
    remove the comments from below
    getURL('../../forms/Program_populate.cfm?
    <cfoutput>#SESSION.URLToken#< /cfoutput>
    &Reference='+data.dataProvider[data.selectedIndex]['ID']
    // need to add more info so put in the plus and add the text of the url variable name (let's assume the id is from CF)
    + '&ID=<cfoutput>#queryName.ID#</cfoutput>&Vendor_Number='
    //we have add the url variable name above, but let's assume it is coming from a form field
    // then we need to close the string, done above and add the value
    + data.dataProvider[data.selectedIndex]['Vendor_Number']
    ,'_blank')
    Hope this helps.
    If you still have problems, assing all this to a cf variable and output it so you can read what it is to debug it.
    Ken

  • Cannot pass Value Using getURL() in Flex 2.0

    I have pasted a piece of code to pass value using query
    string,I am sure there wouldn't be any problem with code.But I get
    error calling getURL() method.
    The error I am getting on compilation is,
    Call to a possibly undefined method getURL.
    4: {
    5: getURL("QueryStringSample.mxml");
    6: }
    I also tried giving entire url as "
    http://localhost:8080/Test/QueryStringSample.mxml",
    since I am running the application using local Tomcat server.both
    the mxml apps,That is, calling.mxml(PassParam.mxml) and
    called.mxml(QueryStringSample.mxml) are in same package/Folder
    (Test).
    what is the cause for this probblem .
    my code..
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    >
    <mx:Script>
    function passVal():void
    getURL("QueryStringSample.mxml");
    </mx:Script>
    <mx:VBox>
    <mx:HBox>
    <mx:Label text="Name: " />
    <mx:TextInput id="nameInput" />
    </mx:HBox>
    <mx:HBox>
    <mx:Label text="Hometown: " />
    <mx:TextInput id="homeTownInput" />
    </mx:HBox>
    <mx:Button label="pass param" click="passVal();" />
    </mx:VBox>
    </mx:Application>
    Thanks in Advance.

    Now that the Flex 2.0 forums are all set up, it is time to
    start using them for 2.0 questions. So in the future, don't post
    2.0 questions here.
    In the meantime, getURL has been changed to navigateToURL().
    See the docs for details.
    Also, I think you are mixing Flex 1.5 and 2.0. 2.0 does not
    use a server, and you do not call mxml file directly. Instead you
    compile the swf with FlexBuilder or the command line compiler, and
    call the html wrapper.
    Tracy

  • Actionscript 3.0 question

    Hi, all
    I absolutely do not know Actionscript 3.0 syntax and need to fix this FAST (of course).
    I named my instance, and used this code snippet. It works:
    thirtyYearFixed.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_3);
    function fl_ClickToGoToWebPage_3(event:MouseEvent):void
        navigateToURL(new URLRequest("http://www.adobe.com"), "_blank");
    this is the previous code, actionscript 2.0 which is pulling dynamic data from the xml:
    on(release) {
        getURL(clickTAG + "?*", "_blank");
    THE QUESTION:
    how do I get it to link to the clickTAG, dynamic data (instead of http://www.adobe.com)
    tia,
    jarnot

    Yup. Thanks! It works. This is what it looks like:
    thirtyYearFixed.addEventListener (MouseEvent.CLICK, onClick);
    fifteenYearFixed.addEventListener (MouseEvent.CLICK, onClick);
    fiveOneArm.addEventListener (MouseEvent.CLICK, onClick);
    seeMoreRates.addEventListener (MouseEvent.CLICK, onClick);
    buttonMovie.addEventListener (MouseEvent.CLICK, onClick);
    AL.addEventListener (MouseEvent.CLICK, onClick);
    AK.addEventListener (MouseEvent.CLICK, onClick);
    AZ.addEventListener (MouseEvent.CLICK, onClick);
    AR.addEventListener (MouseEvent.CLICK, onClick);
    CA.addEventListener (MouseEvent.CLICK, onClick);
    CO.addEventListener (MouseEvent.CLICK, onClick);
    CT.addEventListener (MouseEvent.CLICK, onClick);
    DE.addEventListener (MouseEvent.CLICK, onClick);
    FL.addEventListener (MouseEvent.CLICK, onClick);
    GA.addEventListener (MouseEvent.CLICK, onClick);
    HI.addEventListener (MouseEvent.CLICK, onClick);
    ID.addEventListener (MouseEvent.CLICK, onClick);
    IL.addEventListener (MouseEvent.CLICK, onClick);
    IN.addEventListener (MouseEvent.CLICK, onClick);
    IA.addEventListener (MouseEvent.CLICK, onClick);
    KS.addEventListener (MouseEvent.CLICK, onClick);
    KY.addEventListener (MouseEvent.CLICK, onClick);
    LA.addEventListener (MouseEvent.CLICK, onClick);
    ME.addEventListener (MouseEvent.CLICK, onClick);
    MD.addEventListener (MouseEvent.CLICK, onClick);
    MA.addEventListener (MouseEvent.CLICK, onClick);
    MI.addEventListener (MouseEvent.CLICK, onClick);
    MN.addEventListener (MouseEvent.CLICK, onClick);
    MS.addEventListener (MouseEvent.CLICK, onClick);
    MO.addEventListener (MouseEvent.CLICK, onClick);
    MT.addEventListener (MouseEvent.CLICK, onClick);
    NE.addEventListener (MouseEvent.CLICK, onClick);
    NV.addEventListener (MouseEvent.CLICK, onClick);
    NH.addEventListener (MouseEvent.CLICK, onClick);
    NJ.addEventListener (MouseEvent.CLICK, onClick);
    NM.addEventListener (MouseEvent.CLICK, onClick);
    NY.addEventListener (MouseEvent.CLICK, onClick);
    NC.addEventListener (MouseEvent.CLICK, onClick);
    ND.addEventListener (MouseEvent.CLICK, onClick);
    OH.addEventListener (MouseEvent.CLICK, onClick);
    OK.addEventListener (MouseEvent.CLICK, onClick);
    OR.addEventListener (MouseEvent.CLICK, onClick);
    PA.addEventListener (MouseEvent.CLICK, onClick);
    RI.addEventListener (MouseEvent.CLICK, onClick);
    SC.addEventListener (MouseEvent.CLICK, onClick);
    SD.addEventListener (MouseEvent.CLICK, onClick);
    TN.addEventListener (MouseEvent.CLICK, onClick);
    TX.addEventListener (MouseEvent.CLICK, onClick);
    UT.addEventListener (MouseEvent.CLICK, onClick);
    VT.addEventListener (MouseEvent.CLICK, onClick);
    VA.addEventListener (MouseEvent.CLICK, onClick);
    WA.addEventListener (MouseEvent.CLICK, onClick);
    WV.addEventListener (MouseEvent.CLICK, onClick);
    WI.addEventListener (MouseEvent.CLICK, onClick);
    WY.addEventListener (MouseEvent.CLICK, onClick);
    function onClick (evt:MouseEvent):void {
    var clickTAG:String = loaderInfo.parameters.clickTAG;
         // Check for malicious code injections, only use URLs if they begin with http: or https:
         if ((clickTAG.substr(0, 5) == "http:") || (clickTAG.substr(0, 6) == "https:"))
                  { navigateToURL(new URLRequest(clickTAG + "?" + evt.currentTarget.name), "_blank");

  • Html & flash question

    It is possible to embed a flash .swf inside an html web page.
    Is it possible to embed an html file, such as a long text file, into a flash .swf space, such as a blank movie clip box?
    Is there an alternative way to stick giant text files into a flash style document?

    I definitely discovered this yesterday. Bold and Italic work, but break, paragraph, A HREF, and Headers didn't. With so many restrictions it seems the htmltext option is worthless (kind of like a new Itouch on a camping trip).
    Related question:
    Is there a special protocol, in actionscript that allows Youtube videos to be embedded (rather than creating a hotlink to a new html page with the standard youtube embedding technique) ?
    Almost related question:
    I used this format:
    clicke2.onRelease = function(){
        getURL("http://www.google.com", "_blank");
    for a winamp/mp3 radio station button, with the goal of doing something vaguely similar to shoutcast for a more specific list of internet radio stations, as shown below:
    clicke4.onRelease = function(){
        getURL("http://www.sky.fm/mp3/classical.pls", "_blank");
    this opens a blank html document and plays in winamp. I tried this:
    clicke4.onRelease = function(){
         getURL("http://www.sky.fm/mp3/classical.pls", "_self");
    but it did the same thing - opening a blank page along with the winamp. Opening the winamp is the goal, opening a blank page is not. Is there a way to not open the blank page?

  • URLConnection to filename question

    Not sure if this is the right forum for this but I hope so.
    I have a program which I created that takes a http address and then downloads the file from that address.
    The program looks at the entered URL and downloads its content into a temp file with an arbitrarily name.
    Then, a JFileChooser opens, which is supposed to, by default, suggest the name of the file which was just downloaded.
    This works in MOST situations, but my problem is that if I have a url which redirects, for example, if i pasted the link to a download on a site like for example filehippo.com was what i tested with....
    I gave it the URL: http://www.filehippo.com/download/file/4aac52cca0ce60fd95312eebf41deffc096823c22c2cbf043f4b6dfd323a4b3a/ which is just a trial version of "CC cleaner" or something, but instead of suggesting the name as like install cccleaner.exe or whatever it is supposed to be it is suggesting the name "null" because there is no filename included in that url.
    My question is how can i get the filename which a URLConnection is pointing to / redirecting to 100% so that this will always be correct?
    Thanks
    Robert
    Edited by: rnoack on Jan 27, 2009 11:32 PM

    Check this out
    try {
                // TODO code application logic here
                URL u=new URL("http://www.filehippo.com/download/file/4aac52cca0ce60fd95312eebf41deffc096823c22c2cbf043f4b6dfd323a4b3a/");
                HttpURLConnection con=(HttpURLConnection) u.openConnection();
                con.setDoOutput(true);
                con.setDoInput(true);
                OutputStream out = con.getOutputStream();
                InputStream in = con.getInputStream();
                if(con.getFollowRedirects())
                    System.out.println(con.getURL());
            } catch (UnknownHostException ex) {
                Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IOException ex) {
                Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    Output: http://fs7.filehippo.com/9006/ac2f91079423421eb40b9a8ca428da4d/ccsetup216.exe

  • Change getURL with a variable

    quote:
    I have a movie clip with instance name "launch". I created a
    global variable with:
    _global.launchwebsite = "";
    I have a scrolling menu with thumbnail images. I want each
    thumbnail to dynamically change the URL of the launchwebsite
    variable. I tried putting this code on one of the menu items:
    launchwebsite = "
    http://www.google.com";
    I only get a blank page. If i initially make the global
    variable "launchwebsite" like
    this: _global.launchwebsite = "
    http://www.google.com";
    it works fine. I guess I'm having trouble with the syntax for
    handling the quotes in the getURL("
    http://www.google.com");
    I have getURL(launchwebsite);
    I would really appreciate any help!!!
    Thanks!

    Are you trying to change the global variable with
    launchwebsite = "
    http://www.google.com";? If so,
    you need to have _global.launchwebsite= "
    http://www.google.com" and getURL
    (_global.launchwebsite).
    I could be completely misunderstanding your post, but if you
    do this:
    _global.myVariable = 500;
    myVariable = 20;
    trace(_global.myVariable); // outputs 500
    trace(myVariable); // outputs 20
    You will note you have created two different variables here.
    myVariable is in the _root scope, so you have two variables:
    _global.myVariable and _root.myVariable (or _level0.myVariable).
    Or am I misunderstanding your question?

  • GetURL or javascript resolution? to controlling PDF browser

    Okay.. so here is the scenario.
    I am creating a CD that has a Flash projector. The Flash
    projector links to PDF files located on the same CD. Everything
    works great.. except that when you click on the link to open up the
    PDFs, they open in separate windows. So you could have 8 windows
    open at the same time for 8 of the different PDF files.
    I have already tried to make sure that getURL targets _self.
    This works if you publish the Flash file as an HTML instead of the
    .EXE (projector). However, when you click "Back" on the broswer it
    takes you to the first frame instead of the frame that the links
    coincides on.
    It's been suggested that either through actionscript or
    javascript, to issue a command that will open up the particular PDF
    in a new window. OR another suggestion was to add javascript to PDF
    itself so that Acrobat would control the Acrobat Reader.
    Does anyone know how I could go about doing so? or know of
    any online resources?
    Much appreciated.

    Yes FlashJester JStart can solve this issue and only open up
    one Window,
    which will be the actual Adobe Reader application and not
    viewing it through
    a browser.
    Download an evaluation copy of JStart from here
    http://jstart.flashjester.com
    and look at the example files given.
    There are many FAQ there also.
    http://www.flashjester.com/?section=faq&cPath=28_41
    Good Luck
    Email us directly if you have any further questions.
    Regards
    FlashJester Support Team
    e. - [email protected]
    w. -
    http://www.flashjester.com
    There is a very fine line between "hobby" and
    "mental illness."

  • Basic JDBC Question

    Okay, I think this isn't supposed to be in this forum (Seeing as how there's a JDBC forum and all..), but this is so basic and I'm kicking myself over it I thought I'd put it in here. Anyways:
    I just installed mysql-connector-java-2.0.14, or at least I think I did. I keep getting the "java.lang.ClassNotFoundException: com.mysql.jdbc.Driver" error. I read a lot of the forum hits I got for the error, but none of them helped me out...
    My JDK (I'm using 1.3.1_06 for compatibility reasons) is installed to /usr/java/jdk
    I'm compiling an applet on one machine, but hosting it off another. The applet must then be viewed by the compiling machine, the hosting machine, and any other machines (which I do not have access to).
    My question is this: What the hell am I doing wrong. :) Am I not understanding applets right? Does the client viewing it have to have the mysql driver installed? Does the server need it? I would assume only the compiling computer would...
    And if I only need it on the compiling machine, what am I doing wrong? My environmental variables are set as shown, I'm compiling with the shown command, and the code snippets are from my stuff. Parts in bold are what I feel is relevent (in the paths). God I feel like an idiot...
    Thanks in advance, and sorry to waste your time...
    echo $PATH
    /bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/home/jcourts/bin:/usr/java/jdk/bin:/usr/java/jdk/jre/lib/ext:/usr/java/jdk/jre/lib/ext/mysql-connector-java-2.0.14-bin.jar
    echo $CLASSPATH
    /usr/java/jdk/jre/lib/ext:/usr/java/jdk/jre/lib/ext/mysql-connector-java-2.0.14-bin.jar
    echo $JAVA_HOME
    /usr/java/jdk
    /usr/java/jdk/bin/javac -g -deprecation *.java
    import java.sql.*;
    -and-
    Class.forName("com.mysql.jdbc.Driver");
    Connection con = DriverManager.getConnection("jdbc:mysql://<<host_is_here>>/<<db_name>>?user=<<username>>");

    Hvae program to test the ODBC or JDBC Bridge and driver, so that you know you've set it up right. I gave up on applets ages ago for this sort of thing, though I do know you have to install a seperate driver for applets, perhaps someone could come in on this and guide you more
    This will teat your driver and set-up, so compile and run this code;-
    import java.sql.*;
    import java.util.*;
    public class MyConnection
         Connection con;
         MyConnection()
              try
    // ******************************Connected To Jdbc-Odbc Type - 1 Driver
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    //               con = DriverManager.getConnection("Jdbc:Odbc:dsnname","userid","password");
                   con = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=servername;Database=pubs","userid","password");
    // ******************************Connected To Ms-Access JDBC ODBC Driver .
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con = DriverManager.getConnection("Jdbc:Odbc:dsnname","","");
    //               con = DriverManager.getConnection("jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=G:/admin.mdb","","");
    // ******************************Connected To Ms-Access Type-3 Driver.
         /*          Class.forName ("acs.jdbc.Driver");
                   String url = "jdbc:atinav:servername:5000:C:\\admin.mdb";
                   String username="Admin";
                   String password="";
                   Connection con = DriverManager.getConnection(url,username,password);
    // ******************************Connected To Microsoft SQL.
                   Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                   con = DriverManager.getConnection("jdbc:microsoft:sqlserver://servername:1433","userid","password");
    // ******************************Connected To Merant.
                   Class.forName("com.merant.datadirect.jdbc.sqlserver.SQLServerDriver");
                   con = DriverManager.getConnection("jdbc:merant:sqlserver://servername:1433;User=userid;Password=password");
    // ******************************Connected To Atinav SqlServer.
                   Class.forName ("net.avenir.jdbc2.Driver");
                   con= DriverManager.getConnection("jdbc: AvenirDriver://servername:1433/pubs","userid","password");
    // ******************************Connected To J-Turbo.
    /*               String server="servername";
                   String database="pubs";
                   String user="userid";
                   String password="password";
                   Class.forName("com.ashna.jturbo.driver.Driver");
                   con= DriverManager.getConnection("jdbc:JTurbo://"+server+"/"+database,user,password);
    /*// ******************************Connected To jk Jdbc Driver.
                   String url= "jdbc:jk:server@pubs:1433";
                   Properties prop = new Properties();
                   prop.put("user","userid");//Set the user name
                   prop.put("password","password");//Set the password
                   Class.forName ("com.jk.jdbc.Driver").newInstance();
                   con = DriverManager.getConnection (url, prop);*/
    // ******************************Connected To jNetDirect Type - 4 Driver
    /*               String sConnect = "jdbc:JSQLConnect://127.0.0.1/database=pubs&user=userid&password=password";
                   Class.forName ("com.jnetdirect.jsql.JSQLDriver").newInstance();     
                   Connection con= DriverManager.getConnection(sConnect);
    // ******************************Connected To AvenirDriver Type - 4 Driver
    //               String url= "jdbc: AvenirDriver: //servername:1433/pubs";
    //               java.util.Properties prop = new java.util.Properties ();
    //               prop.put("user","userid");
    //               prop.put("password","password");
    /*               Class.forName ("net.avenir.jdbc2.Driver");     
                   System.out.println(" Connected To AvenirDriver Type - 4 Driver");
                   con= DriverManager.getConnection("jdbc: AvenirDriver://servername:1433/pubs","userid","password");
    // ******************************Connected To iNet Sprinta2000 Type - 4 Driver
         /*          String url="jdbc:inetdae7:servername:1433";
                   String login="userid";
                   String password="password";
                   Class.forName("com.inet.tds.TdsDriver");
                   System.out.println(" Connected To iNet Sprinta2000 Type - 4 Driver");
                   con=DriverManager.getConnection(url,login,password);
    // ******************************Connected To iNet Opta2000 Type - 4 Driver
    /*               String url="jdbc:inetdae7:servername:1433";
                   String login="sagar";
                   String password="sagar";
                   Class.forName("com.inet.tds.TdsDriver").newInstance();
                   System.out.println(" Connected To iNet Opta2000 Type - 4 Driver");
                   con=DriverManager.getConnection(url,login,password);
                   DatabaseMetaData md = con.getMetaData();
                   System.out.println("Driver Name            " + md.getDriverName());
                   System.out.println("Driver Version         " + md.getDriverVersion());
                   System.out.println("Database URL is        " + md.getURL());
                   System.out.println("Database UserName is   " + md.getUserName());
                   System.out.println("Connection Name        " + md.getConnection());
                   System.out.println("Database Name          " + md.getDatabaseProductName());
                   System.out.println("Database Version       " + md.getDatabaseProductVersion());
                   System.out.println("Database ReadOnly Type " + md.isReadOnly());
                   System.out.println("MaxColumnNameLength    " + md.getMaxColumnNameLength());
                   System.out.println("MaxConnections         " + md.getMaxConnections());
                   System.out.println("");
              catch(ClassNotFoundException cnfe)
                   System.out.println(cnfe.getException());
                   System.out.println("The Specified Driver Does not Exist....");
              catch(SQLException sqle)
                   if(sqle.getErrorCode() == 0)
                        System.out.println("No Suitable Driver Found..");
                   else if(sqle.getErrorCode() == 1017)
                        System.out.println("Wrong UserName Or Password..");
                   else if(sqle.getErrorCode() == 1034)
                        System.out.println("Database not Started..");
                        System.out.println(sqle.getErrorCode());
                        System.out.println(sqle.getSQLState());
                        System.out.println(sqle);
         public static void main (String args[])
              new MyConnection();
    }

Maybe you are looking for