SanmanX's Profile User Rating: -----

Reputation: 3 Apprentice
Group:
Members
Active Posts:
32 (0.03 per day)
Joined:
11-January 12
Profile Views:
1,443
Last Active:
User is offline Feb 06 2013 01:02 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   SanmanX has not set their status

Posts I've Made

  1. In Topic: How to render my ajax data

    Posted 25 Oct 2012

    found one way to get it to work, i switched from .ajax to .get:

    function ajaxSearch(){
    		
    	$("#prod").keyup(function(){
    
             var product_id = $("#prod").val();
               $.get('products/product_info',
                 {product_id: product_id},
                 function(result){
              $("#results").html(result.id);
              }
    	});
    
    };
    
    


    hope that helps anyone else with this issue.
  2. In Topic: Jquery Dialog

    Posted 21 Aug 2012

    View PostDormilich, on 20 August 2012 - 12:32 PM, said:

    you have 2 <title> elements in your HTML?


    I guess, for some reason if I put in a 0 instead of the 1 it gives me the title of the home page. The 1 gives me the current page I'm on.
  3. In Topic: Jquery Dialog

    Posted 20 Aug 2012

    I was able to figure it out by having a title on each of the corresponding pages and did:

    title:document.getElementsByTagName('title')[1].innherHTML
    


    Now i have a new problem. I am trying to find a away to change the text for the button depending which window im in. It crash because of my if statement, I'm wondering if someone could help me fix it.

    var my_buttons = ["Add","Run Report", "Make Payment","Create","OK"];
    
    $(document).ready(function(){
    	$(".dialogBox").dialog({
    		title:document.getElementsByTagName('title')[1].innerHTML,
    		width:500,
    		height:400,
    		modal:true,
    		resizable:false,
    	  draggable:false,
    		buttons: [
    		if($('.dialogBox').hasClass('.add'))
    	{
    		text:my_buttons[1],
        click:function(){document.getElementsByTagName("form")[0].submit();}
    	},
    
    		else{
    
    	{
    		text:my_buttons[4],
        click:function(){document.getElementsByTagName("form")[0].submit();}
    	},
    
    		 }
    
    		{
    			text:"Back",
    		  click:function(){$(this).dialog("close");
    			window.location.href = backURL;
    			}
    		}
    	]
    	});
    });
    
    

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

SanmanX hasn't added any friends yet.

Comments

SanmanX has no profile comments yet. Why not say hello?