need heeeelp!! trying to get a value from javascript to a php mail.......

Discussion in 'PHP' started by shahab2012, Feb 6, 2012.

  1. #1
    hi.. trying to get a value from a javascript code in my mail using a php code. And being a novice in programming have no idea how that can be done ... any help would be great...


    
    
    <script
        language="javascript">
    <!-- hide from Browsers
    document.write('<table width=400><td align=center>'); 
    
    
    document.write('<table width=400 ><tr><tr><td align=right colspan=3 
    
    
    BGCOLOR=#FF9999><font size=+2>Running Total : Rs. </td><td colspan=3 
    
    
    BGCOLOR=FF9999> <input type=text name=total size=6 value='+ 
    
    
    format(parent.all_order_totals(),2) + '></font></td><tr>');
    
    
    
    
    
    
    	 
    document.write('<td colspan=6 align=center><b>This is your Order Total so far<br> 
    
    
    <i>Delivery Charges As Per Actuals</i>.</td></tr><tr></table>');
    if (parent.items_ordered == 0)
        document.write('<font color=#000080><b>You have not ordered any items so 
    
    
    far<b></font>');
    
    
    
    
    
    
    if (parent.item_num > 0)
    {
    
    
    for (i =1;i < parent.item_num;i++)
       { if (parent.itemlist[i].quan > 0)
         {index = index + 1;
    document.write('<a href='+ parent.itemlist[i].url + '><i><b> review : </b></i></a>[B]<input [/B]
    
    [B]size=10 type=text name= ' + parent.itemlist[i].code + '   value= ' +  parent.itemlist[i].code + [/B]
    
    [B]'><input size=6  type=text name= ' + parent.itemlist[i].code + ' value=' +  [/B]
    
    [B]parent.itemlist[i].price + '><input size=20 type=text  name= ' + parent.itemlist[i].code + '  [/B]
    
    [B]value= '+  parent.itemlist[i].desc + '><input size=2 type=text name= ' + parent.itemlist[i].desc [/B]
    
    [B]+ '  value= '+  parent.itemlist[i].quan + '><br>'); [/B]
    
    
         } 
       }
    }
    
    
     
    
    
    	
    <!-- end hiding -->
    </script>	
    
    Code (markup):
    having problem with the highlighted part as it does not send the values to mail

    could you help me with how i can get the names and values from the javascript in my mail with php....

    thanks in advance
     
    shahab2012, Feb 6, 2012 IP
  2. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #2
    2 options.. send it through an API
    or
    use ajax
     
    bartolay13, Feb 6, 2012 IP