Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Very new to Java but needs help

  1. #1
    Junior Member
    Join Date
    Jan 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Very new to Java but needs help

    Hello

    I hope one of you fine people can help me.

    I have some experience as a VB.net developer but not java.

    I have a photography site that I am trying to get up and running a a bit prettier.

    I have a MySQL database behind the scene that does some user password storing and hashing.

    On my main page I have a textbox, the user inputs their password and if it validate it returns a XML file location (The xml file has a library of photos). I am using Milkbox as my lightbox plugin

    What I am trying to do is dynamicly pass the retreaved XML file location in to the
    onclick="milkbox.addGalleries('THE XML LOCATION')

    I would also like it done in once click on the login button but as you see from the code below you have to click the link to load the XML and then click the link to display it

    here is my code to my test page, there is not a lot there as im trying to get the functionality done first.

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
     
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Milkbox - Example page - See the html source</title>
     
    	<link rel="stylesheet" href="css/default.css" />
    	<link rel="stylesheet" href="css/main.css" />
    	<link rel="stylesheet" href="css/milkbox/milkbox.css" />
     
    	<style type="text/css" title="text/css">
    		#test{ width:15px; color:#fff; }
    	</style>
     
     	<script src="js/mootools-core.js"></script>
     	<script src="js/mootools-more.js"></script> 
    	<script src="js/milkbox-yc.js"></script>
     
    	<script type="text/javascript">
    	    // <![CDATA[
    	    var addJsonGalleries;
     
    	    $(window).addEvent('domready', function() {
     
    	        addJsonGalleries = function() {
     
    	            //add 3 json galleries
    	            milkbox.addGalleries([
    					{ name: 'obj-gall1', autoplay: true, autoplay_delay: 4, files: [{ href: 'img/01b.jpg', title: 'Test title' }, { href: 'swf/testswf1.swf?var1=yellow&var2=300', size: "width:550, height:400"}] },
     
    					{ name: 'obj-gall2', autoplay_delay: 9, files: [{ href: 'swf/testswf2.swf?var1=ultex&var2=30', size: "width:400, height:300" }, { href: 'swf/testswf1.swf', size: "width:550, height:400"}] },
     
    					{ name: 'obj-gall3', files: [{ href: 'img/croda-b.jpg' }, { href: 'img/ska-b.jpg'}] }
    				]);
     
    	        } //addObjGalleries
     
    	    });
    	    // ]]>
    	</script>
     
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
     
            <asp:TextBox ID="tbPass" runat="server" TextMode="Password"></asp:TextBox>
    &nbsp;
            <asp:Button ID="btngo" runat="server" Text="GO" />
            <br />
            <br />
            <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
     
        </div>
     
        <br /><br />
    		<a href="#" onclick="milkbox.addGalleries('xml/galleries.xml')">Add some xml galleries (works only on a web server, not locally)</a>
    	    <br />
    		<a href="#" onclick="milkbox.open('xmlG2',0)">Show an xml gallery (add the galleries first!)</a>
    		<br />
        </form>
    </body>
    </html>

    Thanks for your help.


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Very new to Java but needs help

    Is this a java question, or a javascript question? The two are completely different, and this is a java specific forums.

  3. #3
    Junior Member
    Join Date
    Jan 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Very new to Java but needs help

    As a newbie to Java I wouldn't know so a point in the right direction would be nice!

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Very new to Java but needs help

    Your code looks like javascript. Try posting the question on a javascript forum.
    If you don't understand my answer, don't ignore it, ask a question.

Tags for this Thread