Jump to content

eddy556

Members
  • Posts

    85
  • Joined

  • Last visited

Everything posted by eddy556

  1. I have a problem with the offsetLeft function in Firefox, it gives out different numbers than in IE. After a bit of research I have found out that this is very well known however I have yet to find a proper solution. This is my code (works in IE), is there any way this could be converted to work in both? function findPos(obj) { var curleft = curtop = 0; if (obj.offsetParent) { curleft = obj.offsetLeft; curtop = obj.offsetTop; while (obj = obj.offsetParent) { curleft += obj.offsetLeft; curtop += obj.offsetTop; } } return [curleft,curtop]; }
  2. Ahh gud idea, I did try something similar - but I've finished work now so Ill test first thing monday :-)
  3. Sorry its is currently all under development and so there is no live server hosting this. The bug is caused by the output of this control: http://dotnetslackers.com/articles/aspnet/Custom_ASPNET_ComboxBox_Control.aspx I works perfectly in IE, but I know how firefox is on standards etc (not a bad thing). But no matter what I do I cannot produce a workaround.
  4. Please take a look at the following code, it works as expected in IE but in firefox gives this error: Error: ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper is not defined Source File: http://localhost:1981/user_area.aspx Line: 1 <div style="vertical-align:top; overflow:hidden;vertical-align:middle; table-layout:fixed;"> <span id="ctl00_ContentPlaceHolder1_lblCompName">Company Name:</span> <div id="ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper" nowrap="nowrap" style="width:auto;display:inline;"> <input name="ctl00$ContentPlaceHolder1$ComboBoxCompany$ComboBoxTextBox" type="text" id="ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox" onkeydown="if(event.keyCode == 9){ScsComboBox_ListBoxDisplaySelectedText(ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper_ListBox,ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox);return false;}" onkeyup="ScsComboBox_TextBoxKeyup(ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox,ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper_ListBox,event)" onmouseover="javascript:if(ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox!=_activeComboBoxTextBox) ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox.className='';" onmouseout="javascript:if(ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox!=_activeComboBoxTextBox) ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox.className='';" onfocus="javascript:ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox.className='';SetActiveComboBoxTextBox(ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox);" onblur="javascript:ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox.className='';SetActiveComboBoxTextBox(null);ScsComboBox_TextBoxBlur(this,ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper_ListBoxWrapper)" /><img id="ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxPopupImage" onclick="ScsComboBox_ListBoxShow(ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper,ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper_ListBoxWrapper);" src="/WebResource.axd?d=X2Mjr-4_fQgIerHGoJmLA4beQeL_mfrdmCV81jcoxue0BEu7vgKAFYZC1vKcoczQLOBzEgrPxoh-ptiiioWRcw2&t=633717605465074708" align="absmiddle" style="border-width:0px;" /><div id="ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper_ListBoxWrapper" style="position:absolute;visibility:hidden;top:-100px;left:-100px;"> <select size="5" id="ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper_ListBox" name="ctl00$ContentPlaceHolder1$ComboBoxCompany" onclick="ScsComboBox_ListBoxDisplaySelectedText(ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper_ListBox,ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox);" onchange="shouldIPostBack()(this);" onkeyup="ScsComboBox_ListBoxKeyup(ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper_ListBox,ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox,event);" onblur="ScsComboBox_ListBoxHide(ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper_ListBox.offsetParent);javascript:ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox.className='';SetActiveComboBoxTextBox(null);" onmouseover="javascript:if(ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox!=_activeComboBoxTextBox) ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox.className='';" onmouseout="javascript:if(ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox!=_activeComboBoxTextBox) ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox.className='';" onfocus="javascript:ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox.className='';SetActiveComboBoxTextBox(ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox);"> <option selected="selected" value="-1"></option> <option value="ABC Ltd">ABC Ltd</option> <option value="hello">hello</option> <option value="Tirril Brewery">Tirril Brewery</option> </select> </div> </div> With the following function called on the onclick event: function ScsComboBox_ListBoxShow(txtBxWrapper, lstBxWrapper) { if(lstBxWrapper.style.visibility == "visible") { ScsComboBox_ListBoxHide(lstBxWrapper); return; } var pos = findPos(txtBxWrapper); var top = pos[1]; var left = pos[0]; lstBxWrapper.style.left = left+1; lstBxWrapper.style.top = top+txtBxWrapper.offsetHeight; lstBxWrapper.style.visibility = "visible"; lstBxWrapper.all[0].focus(); lstBxWrapper.all[0].style.width = txtBxWrapper.offsetWidth; } I apologies for the formatting of the code, but I am interested in the image tags onclick event: <img id="ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxPopupImage" onclick="ScsComboBox_ListBoxShow(ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper,ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper_ListBoxWrapper);" As you can see this fires the above javascript.
  5. Sorry for creating a new thread but I've just gone and solved this myself: function isWorkArea() { var strQuery; var arrayParm; var arrayValue; var Value1, Value2 strQuery = location.search.substring(1); arrayParm = strQuery.split("&"); if (arrayParm[0] != null) { arrayValue = arrayParm[0].split("="); Value1 = arrayValue[1]; } if (arrayParm[1] != null) { arrayValue = arrayParm[1].split("="); Value2 = arrayValue[1]; } if (Value1 == "undefined") { //Value1 does not exist } if (Value1 != "undefined" && Value2 == "undefined") { //Value1 exists and Value2 doesn't } }
  6. How can I check wether I certain variable is available in the URL? For example: if ([VARIABLE exists in URL]) { //Do this }
  7. Like I said this way it by design. Its becuase the bottom table is able to be scrolled whilst keeping the header (first table) static - i.e. the user can always see the header no matter which record they are viewing.
  8. I have the following HTML code which exists of two tables. One table is to act as the header, the other as the body. It is like this by design. My problem is even though every cell has its width set - the two tables do not line up.... <table id="ctl00_ContentPlaceHolder1_Table1" style="border-collapse: collapse;" border="1" cellspacing="0"> <tbody><tr> <td id="ctl00_ContentPlaceHolder1_mtrlcodeheader" style="width: 50px;"> <a id="ctl00_ContentPlaceHolder1_lnkSortCode" title="Sort by Material Code: Click once to sort acsending, again for decscending" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$lnkSortCode','')">Code</a> </td> <td id="ctl00_ContentPlaceHolder1_tradename" style="width: 210px;"> <a id="ctl00_ContentPlaceHolder1_lnkTradeName" title="Sort by Trade Name: Click once to sort acsending, again for decscending" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$lnkTradeName','')">Trade Name</a> </td> <td id="ctl00_ContentPlaceHolder1_keyword" style="width: 130px;"> <a id="ctl00_ContentPlaceHolder1_lnkKeyWord" title="Sort by Keyword: Click once to sort acsending, again for decscending" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$lnkKeyWord','')">Keyword</a> </td> <td id="ctl00_ContentPlaceHolder1_supp" style="width: 250px;"> <a id="ctl00_ContentPlaceHolder1_Supplier" title="Sort by Company: Click once to sort acsending, again for decscending" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$Supplier','')">Company</a> </td> <td id="ctl00_ContentPlaceHolder1_chkbx" style="width: 54px;"> </td> </tr> </tbody></table> <!-- Height="149px" --> <div> <table id="ctl00_ContentPlaceHolder1_GridView2" style="border-collapse: collapse;" rules="all" border="1" cellspacing="0"> <tbody><tr style="text-decoration: none;" onmouseover="javascript:setMouseOverColor(this);" onmouseout="javascript:setMouseOutColor(this);"> <td onclick="javascript:__doPostBack('ctl00$ContentPlaceHolder1$GridView2$ctl02$ctl00','')" style="background-color: Yellow; width: 50px;">604</td><td onclick="javascript:__doPostBack('ctl00$ContentPlaceHolder1$GridView2$ctl02$ctl00','')" style="width: 210px;">WD-40 BULK LIQUID</td><td onclick="javascript:__doPostBack('ctl00$ContentPlaceHolder1$GridView2$ctl02$ctl00','')" style="width: 130px;">Lubricant (Solvent)</td><td onclick="javascript:__doPostBack('ctl00$ContentPlaceHolder1$GridView2$ctl02$ctl00','')" style="width: 250px;">WD-40 COMPANY</td><td style="width: 27px;"> <!--<asp:ImageButton ID="ImageButtonWorkArea" Height="27px" ImageUrl="~/Images/close-48x48.png" CommandName="AddtoWorkArea" />--> <a href="#"><img class="addAssessmentImage" src="/Images/close-48x48.png" alt="add assessment" height="27"></a> <!--.addAssessmentImage--> </td><td style="width: 27px;"> <input name="ctl00$ContentPlaceHolder1$GridView2$ctl02$ImageButton1" id="ctl00_ContentPlaceHolder1_GridView2_ctl02_ImageButton1" src="Images/delete-48x48.png" style="border-width: 0px; height: 27px;" type="image"> </td> </tr><tr style="text-decoration: none;" onmouseover="javascript:setMouseOverColor(this);" onmouseout="javascript:setMouseOutColor(this);"> <td onclick="javascript:__doPostBack('ctl00$ContentPlaceHolder1$GridView2$ctl03$ctl00','')" style="background-color: Red; width: 50px;">1947</td><td onclick="javascript:__doPostBack('ctl00$ContentPlaceHolder1$GridView2$ctl03$ctl00','')" style="width: 210px;">LUBRICANT GEL</td><td onclick="javascript:__doPostBack('ctl00$ContentPlaceHolder1$GridView2$ctl03$ctl00','')" style="width: 130px;">Lubricant</td><td onclick="javascript:__doPostBack('ctl00$ContentPlaceHolder1$GridView2$ctl03$ctl00','')" style="width: 250px;">DURAPIPE GLYNWED PLASTICS LTD</td><td style="width: 27px;"> <!--<asp:ImageButton ID="ImageButtonWorkArea" Height="27px" ImageUrl="~/Images/close-48x48.png" CommandName="AddtoWorkArea" />--> <a href="#"><img class="addAssessmentImage" src="/Images/close-48x48.png" alt="add assessment" height="27"></a> <!--.addAssessmentImage--> </td><td style="width: 27px;"> <input name="ctl00$ContentPlaceHolder1$GridView2$ctl03$ImageButton1" id="ctl00_ContentPlaceHolder1_GridView2_ctl03_ImageButton1" src="Images/delete-48x48.png" style="border-width: 0px; height: 27px;" type="image"> </td> </tr><tr style="text-decoration: none;" onmouseover="javascript:setMouseOverColor(this);" onmouseout="javascript:setMouseOutColor(this);"> <td onclick="javascript:__doPostBack('ctl00$ContentPlaceHolder1$GridView2$ctl04$ctl00','')" style="background-color: Red; width: 50px;">159171</td><td onclick="javascript:__doPostBack('ctl00$ContentPlaceHolder1$GridView2$ctl04$ctl00','')" style="width: 210px;">MOTEX STEAM CLEAN DETERGENT</td><td onclick="javascript:__doPostBack('ctl00$ContentPlaceHolder1$GridView2$ctl04$ctl00','')" style="width: 130px;">Detergent</td><td onclick="javascript:__doPostBack('ctl00$ContentPlaceHolder1$GridView2$ctl04$ctl00','')" style="width: 250px;">JAYGRADE LTD.</td><td style="width: 27px;"> <!--<asp:ImageButton ID="ImageButtonWorkArea" Height="27px" ImageUrl="~/Images/close-48x48.png" CommandName="AddtoWorkArea" />--> <a href="#"><img class="addAssessmentImage" src="/Images/close-48x48.png" alt="add assessment" height="27"></a> <!--.addAssessmentImage--> </td><td style="width: 27px;"> <input name="ctl00$ContentPlaceHolder1$GridView2$ctl04$ImageButton1" id="ctl00_ContentPlaceHolder1_GridView2_ctl04_ImageButton1" src="Images/delete-48x48.png" style="border-width: 0px; height: 27px;" type="image"> </td> </tr><tr style="text-decoration: none;" onmouseover="javascript:setMouseOverColor(this);" onmouseout="javascript:setMouseOutColor(this);"> <td onclick="javascript:__doPostBack('ctl00$ContentPlaceHolder1$GridView2$ctl05$ctl00','')" style="background-color: Red; width: 50px;">154903</td><td onclick="javascript:__doPostBack('ctl00$ContentPlaceHolder1$GridView2$ctl05$ctl00','')" style="width: 210px;">EASY FINISH</td><td onclick="javascript:__doPostBack('ctl00$ContentPlaceHolder1$GridView2$ctl05$ctl00','')" style="width: 130px;">Aerosol</td><td onclick="javascript:__doPostBack('ctl00$ContentPlaceHolder1$GridView2$ctl05$ctl00','')" style="width: 250px;">ADVANCED ENGINEERING LTD.</td><td style="width: 27px;"> <!--<asp:ImageButton ID="ImageButtonWorkArea" Height="27px" ImageUrl="~/Images/close-48x48.png" CommandName="AddtoWorkArea" />--> <a href="#"><img class="addAssessmentImage" src="/Images/close-48x48.png" alt="add assessment" height="27"></a> <!--.addAssessmentImage--> </td><td style="width: 27px;"> <input name="ctl00$ContentPlaceHolder1$GridView2$ctl05$ImageButton1" id="ctl00_ContentPlaceHolder1_GridView2_ctl05_ImageButton1" src="Images/delete-48x48.png" style="border-width: 0px; height: 27px;" type="image"> </td> </tr> </tbody></table>
  9. I have the following line: mysql_query("INSERT INTO results (user, movie, input, prediction, error) VALUES('" . $_POST['email'] '" , "' . $Movies[$m]['title'] . '","' . $Movies[$m]["rating"] . '","' . $result . '","' . $err . "' ) ") or die(mysql_error()); However I'm getting mixed up with the opening and closing of "'", can you please have a look?
  10. This is the HTML output of my php script. Can you understand why each time I reload the page - the checked radio button moves along one? <html> <head><title>Realtime Collaborative Filtering</title> <form name="myform" action="result.php" method="POST"> <table border="1"> Enter your e-mail address: <input type="text" name="email"> <tr><td>Dragon Ball - Fortun Teller Baba Saga</td><td>1<input type='radio' name='Dragon Ball - Fortun Teller Baba Saga' value='1' >2<input type='radio' name='Dragon Ball - Fortun Teller Baba Saga' value='2' checked />3<input type='radio' name='Dragon Ball - Fortun Teller Baba Saga' value='3' >4<input type='radio' name='Dragon Ball - Fortun Teller Baba Saga' value='4' >5<input type='radio' name='Dragon Ball - Fortun Teller Baba Saga' value='5' ></td></tr><tr><td>Dune</td><td>1<input type='radio' name='Dune' value='1' >2<input type='radio' name='Dune' value='2' >3<input type='radio' name='Dune' value='3' >4<input type='radio' name='Dune' value='4' >5<input type='radio' name='Dune' value='5' checked /></td></tr><tr><td>Felicity - Season 2</td><td>1<input type='radio' name='Felicity - Season 2' value='1' >2<input type='radio' name='Felicity - Season 2' value='2' checked />3<input type='radio' name='Felicity - Season 2' value='3' >4<input type='radio' name='Felicity - Season 2' value='4' >5<input type='radio' name='Felicity - Season 2' value='5' ></td></tr><tr><td>Freddy Got Fingered</td><td>1<input type='radio' name='Freddy Got Fingered' value='1' >2<input type='radio' name='Freddy Got Fingered' value='2' >3<input type='radio' name='Freddy Got Fingered' value='3' checked />4<input type='radio' name='Freddy Got Fingered' value='4' >5<input type='radio' name='Freddy Got Fingered' value='5' ></td></tr><tr><td>I Heart Huckabees</td><td>1<input type='radio' name='I Heart Huckabees' value='1' >2<input type='radio' name='I Heart Huckabees' value='2' >3<input type='radio' name='I Heart Huckabees' value='3' >4<input type='radio' name='I Heart Huckabees' value='4' >5<input type='radio' name='I Heart Huckabees' value='5' checked /></td></tr><tr><td>Lost in Translation</td><td>1<input type='radio' name='Lost in Translation' value='1' >2<input type='radio' name='Lost in Translation' value='2' >3<input type='radio' name='Lost in Translation' value='3' >4<input type='radio' name='Lost in Translation' value='4' >5<input type='radio' name='Lost in Translation' value='5' checked /></td></tr><tr><td>Pearl Harbor</td><td>1<input type='radio' name='Pearl Harbor' value='1' >2<input type='radio' name='Pearl Harbor' value='2' >3<input type='radio' name='Pearl Harbor' value='3' checked />4<input type='radio' name='Pearl Harbor' value='4' >5<input type='radio' name='Pearl Harbor' value='5' ></td></tr><tr><td>The Royal Tenenbaums</td><td>1<input type='radio' name='The Royal Tenenbaums' value='1' >2<input type='radio' name='The Royal Tenenbaums' value='2' >3<input type='radio' name='The Royal Tenenbaums' value='3' >4<input type='radio' name='The Royal Tenenbaums' value='4' >5<input type='radio' name='The Royal Tenenbaums' value='5' checked /></td></tr><tr><td>The Wedding Planner</td><td>1<input type='radio' name='The Wedding Planner' value='1' >2<input type='radio' name='The Wedding Planner' value='2' checked />3<input type='radio' name='The Wedding Planner' value='3' >4<input type='radio' name='The Wedding Planner' value='4' >5<input type='radio' name='The Wedding Planner' value='5' ></td></tr><tr><td>VeggieTales - Heroes of the Bible</td><td>1<input type='radio' name='VeggieTales - Heroes of the Bible' value='1' >2<input type='radio' name='VeggieTales - Heroes of the Bible' value='2' checked />3<input type='radio' name='VeggieTales - Heroes of the Bible' value='3' >4<input type='radio' name='VeggieTales - Heroes of the Bible' value='4' >5<input type='radio' name='VeggieTales - Heroes of the Bible' value='5' ></td></tr><input type="submit"> </form> </html>
  11. Yes I have done that - and just checked again... But I think the problem is I AM breaking out of the if(statement) however I ALSO need to break out of the foreach (only if that if statement was true). Hope you understand me :-)
  12. Yea sorry it was in there (promise lol) I've just replaced it with the comment.
  13. Please see the following code - I need to break out of the code if the if statement fires, I've tried break but it doesn't seem to do anything. foreach($_POST as $var => $value) { echo "Array title: " . $Movies[$movieno]["title"] . "<br />"; echo "Post value: " . str_replace('_', ' ', $var) . "<br />"; if($Movies[$movieno]["title"] = str_replace('_', ' ', $var)) { $Movies[$movieno]["rating"] = $value; //need to break outta here! } }
  14. Hi, when I am receive any values from POST any spaces are swapped with underscores (_) as such: Dragon_Ball_-_Fortun_Teller_Baba_Saga However I would like to be able to compare this to: Dragon Ball - Fortun Teller Baba Saga So therefore how would I go about removing all of the underscores in order to provide a comparison?
  15. How can I access an an access an associative array by number. For example: $myArray["cat"][0] = "this is at place one"; echo $myArray[0][0];
  16. Ah yes, spot on! Argh hate it when its an obvious answer. Many thanks :-)
  17. I have two scripts predictionfiltering.php and result.php, prediction filtering has a form on it, which I'm trying to read in result.php. Here is the source of predictionfiltering: <html> <head><title>Realtime Collaborative Filtering</title> <form name="myform" action="result.php" method="POST"> <table border="1"> <tr><td><u>Movie</u></td><td>Rating</td><td>Prediction</td><td>Error</td></tr> <tr><td>Dragon Ball - Fortun Teller Baba Saga</td><td>1<input type="radio" name="Dragon Ball - Fortun Teller Baba Saga1" value="1" />2<input type='radio' name='Dragon Ball - Fortun Teller Baba Saga' value='2' />3<input type='radio' name='Dragon Ball - Fortun Teller Baba Saga' value='3' />4<input type='radio' name='Dragon Ball - Fortun Teller Baba Saga'value='4' />5<input type='radio' name='Dragon Ball - Fortun Teller Baba Saga'value='5' /></td><td>hello</td><td>hello</td></tr><tr><td>Dune</td><td>1<input type="radio" name="Dune1" value="1" />2<input type='radio' name='Dune' value='2' />3<input type='radio' name='Dune' value='3' />4<input type='radio' name='Dune'value='4' />5<input type='radio' name='Dune'value='5' /></td><td>hello</td><td>hello</td></tr><tr><td>Felicity - Season 2</td><td>1<input type="radio" name="Felicity - Season 21" value="1" />2<input type='radio' name='Felicity - Season 2' value='2' />3<input type='radio' name='Felicity - Season 2' value='3' />4<input type='radio' name='Felicity - Season 2'value='4' />5<input type='radio' name='Felicity - Season 2'value='5' /></td><td>hello</td><td>hello</td></tr><tr><td>Freddy Got Fingered</td><td>1<input type="radio" name="Freddy Got Fingered1" value="1" />2<input type='radio' name='Freddy Got Fingered' value='2' />3<input type='radio' name='Freddy Got Fingered' value='3' />4<input type='radio' name='Freddy Got Fingered'value='4' />5<input type='radio' name='Freddy Got Fingered'value='5' /></td><td>hello</td><td>hello</td></tr><tr><td>I Heart Huckabees</td><td>1<input type="radio" name="I Heart Huckabees1" value="1" />2<input type='radio' name='I Heart Huckabees' value='2' />3<input type='radio' name='I Heart Huckabees' value='3' />4<input type='radio' name='I Heart Huckabees'value='4' />5<input type='radio' name='I Heart Huckabees'value='5' /></td><td>hello</td><td>hello</td></tr><tr><td>Lost in Translation</td><td>1<input type="radio" name="Lost in Translation1" value="1" />2<input type='radio' name='Lost in Translation' value='2' />3<input type='radio' name='Lost in Translation' value='3' />4<input type='radio' name='Lost in Translation'value='4' />5<input type='radio' name='Lost in Translation'value='5' /></td><td>hello</td><td>hello</td></tr><tr><td>Pearl Harbor</td><td>1<input type="radio" name="Pearl Harbor1" value="1" />2<input type='radio' name='Pearl Harbor' value='2' />3<input type='radio' name='Pearl Harbor' value='3' />4<input type='radio' name='Pearl Harbor'value='4' />5<input type='radio' name='Pearl Harbor'value='5' /></td><td>hello</td><td>hello</td></tr><tr><td>The Royal Tenenbaums</td><td>1<input type="radio" name="The Royal Tenenbaums1" value="1" />2<input type='radio' name='The Royal Tenenbaums' value='2' />3<input type='radio' name='The Royal Tenenbaums' value='3' />4<input type='radio' name='The Royal Tenenbaums'value='4' />5<input type='radio' name='The Royal Tenenbaums'value='5' /></td><td>hello</td><td>hello</td></tr><tr><td>The Wedding Planner</td><td>1<input type="radio" name="The Wedding Planner1" value="1" />2<input type='radio' name='The Wedding Planner' value='2' />3<input type='radio' name='The Wedding Planner' value='3' />4<input type='radio' name='The Wedding Planner'value='4' />5<input type='radio' name='The Wedding Planner'value='5' /></td><td>hello</td><td>hello</td></tr><tr><td>VeggieTales - Heroes of the Bible</td><td>1<input type="radio" name="VeggieTales - Heroes of the Bible1" value="1" />2<input type='radio' name='VeggieTales - Heroes of the Bible' value='2' />3<input type='radio' name='VeggieTales - Heroes of the Bible' value='3' />4<input type='radio' name='VeggieTales - Heroes of the Bible'value='4' />5<input type='radio' name='VeggieTales - Heroes of the Bible'value='5' /></td><td>hello</td><td>hello</td></tr><input type="submit"> </form> </html> however I'm getting the error: Notice: Undefined index: Dragon Ball - Fortun Teller Baba Saga1 in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\rentacoder\result.php on line 1 on result.php when submitting the form. <? echo $_POST["Dragon Ball - Fortun Teller Baba Saga1"];?> I know this is something very simple! Thanks for looking
  18. Not that I know of as the asp validation is meant to check that a peice of input is correct. For example if something matches an e-mail address it is considered valid - that is when it matches the regex the input is valid. However I'm trying to check that a user selected something from a drop-down box - hence this time if the regex matches "please select" i need to be returned as invalid.
  19. Yes but it all has to be within the regex otherwise I would do a simple if(! ...). This is becuase it is part of a validation control in an asp.net application (yes I know its a bit cheeky asking on here but you guys know your regexes!). I need the regex to match (revert to true) when it doesn't match a given value.
  20. I need a regular expression which will match ONLY when it doesn't match something. For example I only don't want it to match when it was compared to the text "please select" and no match all other text. In this case I am after the opposite of what the regular expression = Please select would match. I'm after something like != Please select. I hope you understand!!
  21. Okay I agree about not storing <br /> in the database as its actually NOTHING to do with the data being stored, however I'm pretty sure if this is true the whole problem here is attempting to store FORMATTING in the database which is also wrong - if these values are fundamentally seperate (they are all different qualifications) they should be stored within different records. I am correct?
  22. Just to follow up below is the whole of my code: <?php $link = mysql_connect('localhost', 'root', '*******'); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; mysql_select_db("media_files"); //$query = "SELECT * FROM `playlist`"; // <---The line which works using SQL $query = "call p1();"; //<--The subsituted line $result = mysql_query($query); while($row = mysql_fetch_array($result)) //<--Error occurs here { echo "FileName :{$row['filename']} <br>" . "Title : {$row['title']} <br>" . "Artist : {$row['artist']} <br>" . "Length: {$row['length']}<br>"; } mysql_close($link); ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.