Jump to content

Sharkadder

Members
  • Content Count

    119
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Sharkadder

  • Rank
    Member
  1. Hi there, It is ok i sorted this now, happens that i had a parent outcome id field in my table and so each sub-outcome had a parent id which was linked to the main outcome ID. All i did was get the main outcome ID's from the database in ascending order, and then search for each sub-criteria who had that main outcome ID as their parent...then i was able to capture the information in the order i needed. Many thanks, Mark
  2. Hi there, I have an SQL table which has a field within it that holds data within a row. The field holds data for outcomes which can be listed as follows: Outcome 1 1.1 1.2 Outcome 2 2.1 2.2 1.3 Outcome 4 4.1 4.2 Outcome 3 3.1 1.4 etc. Basically, they are not in order as people have been typing them into the database table in a random order. Is there a way i can get it so that it shows everything to do with outcome 1 under outcome 1 etc. once i pull the rows from the database? e.g. Outcome 1 1.1 1.2 1.3 1.4 Outcome 2 2.1 2.2 etc. I have tried assending
  3. Thanks dude i have added that code in now. I have got it all working and even the .value is now working which is really good since i modified the code to what you said. If i stumble across any other problems i shall post on here but i think it is sorted now, going to do some testing tomorrow on my script :-). Mark
  4. Hi dude, Thank you once again for the reply. Basically i have a loop which loops through all of the table rows from within a table, each iteration of the loop uses the number i which increments each time the loop goes around. This is why i have code such as: document.getElementsByTagName("tr") <---the i here is the TR element number for whichever iteration the loop is on. So if we look at what i am trying to achieve, I am trying to change the id and name of a select element and three input elements within TD tags using Javascript, alternatively i could use jQuery. I cannot use any server
  5. Hi there and thank you for the reply. I have tried just about everything and silly internet explorer keeps kicking back error messages! Beginning to get frustrating now. Do you know of any function where i can pass it the tag name i am wanting to send HTML to e.g."document.getElementsByTagName("tr")" and to then replace the HTML to update the table row without innerHTML I have tried the following and it just does not work! //inside the head of the document function replaceHtml(el, html) { var oldEl = typeof el === "string" ? document.getElementById(el) : el; /*@cc_on // Pure innerHTML is
  6. Hi there, I have recently been trying some code out to replace the innerHTML contents from within a table row, i am now to discover that Internet Explorer which a lot of people still use insists of making innerHTML properties read only, although the code works flawlessly in Firefox and Google Chrome. The code i have currently got is shown below: document.getElementsByTagName("tr").innerHTML = document.getElementsByTagName("tr").innerHTML.replace(document.getElementsByTagName("tr").cells[j].childNodes[0].id,nameandid).replace(document.getElementsByTagName("tr").cells[j].childNodes[0].name,namea
  7. Hi, I solved the problem with the following function, although it does require a loop. Not sure if there is a more efficent way but my page seems to load fine with it: //dropdown is the dropdown you selected and theForm is the formfunction checkselected(theForm, dropdown){for (i=0; i<theForm.length; i++) { //myval.options[myval.selectedIndex].innerHTML if (theForm.elements[i].type == "select-one") { if (dropdown.options[dropdown.selectedIndex].innerHTML == theForm.elements[i].options[theForm.elements[i].selectedIndex].innerHTML && theForm.elements[i].name != dropdown.name)
  8. Hi there, I have 10 drop down boxes on a page where people can select some units they wish to study. Obviously people can pick more than one unit and so i want to avoid them from picking the same unit twice in each of the drop down boxes. I have looked into the disable function on drop down boxes but cannot figure out how i would go about disabling a drop down selection entry using Javascript. So far i have looked at the following jquery function below but it will not work on my php page as i do not have access to the head of the document on the platform i am on and just the body: $('select'
  9. Hi there, I have been looking up on how to use SOAP in relation to php and have managed to hit a bit of a snag with it. Basically on my server i get some information which is presented in xml format from sharepoint. I then wish to access this data from a php file on another server and print it out onto the screen. I have heard using a soap call is the best method for this. The problems i am having are as follows: Gaining authorisation to the xml file i which contains the soap contents i.e. how to log in with username and password Reading the soap content in php to capture some data and pri
  10. yeah i knew that much but just wodnered if it was good practise.anyways, cheers dude.
  11. ok i decided to try on a different person in case of data input error but the same thing occured. The name John O'Shea was tried and it worked well and it now works for both names.I looked at your code and the apostrophe was the same character, i then looked at what you said and the result now shows. Some of the suggested code must have been wrong as an error on my part but it now works well. Do you recommend using a slash before the apostrophe in the raw database or leave it without one?Thanks for all of the help and suggestions...i am not sure if i need the code which was first suggested
  12. Ok it still says no records found. The name is definately in the database and so i'm thinking the apostrophe isn't matching the one from the raw database. I have done as justsomeguy says and taken off the condition to search a category but it just says no results. If i change the name for one without an apostrophe in then it finds the name and so it's got to be to do with removing the apostrophe.Here is the current code: if (get_magic_quotes_gpc()) { $_GET = fixMagicQuotes($_GET); $_POST = fixMagicQuotes($_POST); $_REQUEST = fixMagicQuotes($_REQUEST); $_COOKIE = fixMagicQuotes($_COOKIE);
  13. ok i added in the slight error check modification and still nothing. I get no errors from the search, just it doesn't appear to find anything.the record definately exists and is definately in the database without a \ before the apostrophe. What else do you think i could try?
  14. ok i tried that and it never worked, the query now shows this: Adam O'DonnellSELECT * FROM FootballPlayers WHERE lower(Name) LIKE lower('%Adam O\'Donnell%') AND lower(PlayerManager) LIKE lower('%') COLLATE utf8_bin ORDER BY Name asc
  15. Your code didn't work, still says no results found although i am no longer getting the numrows error. In fact your code doesn't work for any person in my database with or without apostrophe, so it must be going wrong somewhere. Below is a copy of my updated code and query, i moved the $searchterm and $playermanager = str_replace codes down a bit as no results were showing for anything when they were in the position you said: if (get_magic_quotes_gpc()) { @array_walk_recursive($_GET, 'stripslashes'); @array_walk_recursive($_POST, 'stripslashes'); @array_walk_recursive($_REQUEST, 'stripslash
×
×
  • Create New...