Search results

  1. S

    Has anyone here found a solution to IE Hover?

    If you're talking about javascript, I highly highly recommend taking the time to learn how to take advantage of jquery, takes the crossbrowser issues right out of javascript. jQuery has its own hover event.
  2. S

    reading a txt file with AJAX

    What is the error you are getting? If you are not sure, try using the firebug addon for firefox to check your javascript. Right now, I can't seem to find where your function 'handleResponse' is defined. You have set that function to be called when the readystate of your ajax request changes...
  3. S

    Javascript Replace

    Burst my bubble D: . Thanks for the solution though.
  4. S

    Javascript Replace

    @descalzo: Hehe, well spotted. That's an annoying case. I'll try to come up with a work around. @seaside: The toLowerCase bit posted above shooould work for the case sensitivity. If you're copying and pasting, make sure that no spaces are in the code. I forgot to put the code tags around my...
  5. S

    Javascript Replace

    Javascript has a .toLowerCase() property, the only fallback of this is that your output string will not keep the case formatting of the original string, without a needlessly complicated script. So, if you want cases to not be a problem: Javascript: function tmod(id){ var str =...
  6. S

    Javascript Replace

    I'm not quite sure what you mean sorry. If you want an interface where users can enter text, then choose what word to replace with what, you could do something like this: HTML: <input type='text' id='input1' /><input type='text' id='input1str' /><input type='text' id='input1rep' /><button...
  7. S

    Javascript Replace

    HTML: <div id="text">Hello my name is John Smith</div><button onclick="tmod('text')">Click</button> Javascript: function tmod(id){ var str = document.getElementById(id).innerHTML; str = str.replace("is","was"); str = str.replace("Hello","Hi"); document.getElementById(id).innerHTML = str; } Oh...
  8. S

    Auto Refresh for new content

    They should only load a cached css file... If your CSS file has the same name as the one on your old website, change its name and then the user will be forced to load the CSS scripts again. If it isn't because of the css file, then it's the users own fault for using a bad browser. They will...
  9. S

    First result doesn't show.

    Well the problem lies in this part of the code: <?php $search_sql = mysql_query("SELECT * FROM `mp3` WHERE (`title` LIKE '%".$query."%' OR `song_author` LIKE '".$query."' OR `album` LIKE '".$query."') AND (`active` > '0') ORDER BY `song_author`, `title` ASC"); $search_rst =...
  10. S

    PHP And HTML Div Tags

    Check for overlapping tags etc. I'm guessing that the included file has one too many </div> tags.
  11. S

    Random Information

    <?php $num = rand(1,3); switch($num){ case 1: $include = "file1.php"; break; case 2: $include = "file2.php"; break; case 3: $include = "file3.php"; break; } include "inludepath/".$include; ?> And here's an idea similar to Quantum's. $files =...
  12. S

    TAFE Student again - currency conversion

    If you want to try something a little more advanced, try using an XML for currency rates. Eg: http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml
  13. S

    Date/Calendar functions and parameterized queries help needed.

    The following error clearly shows a coding error: Fatal error: Function name must be a string in /home/[domain]/public_html/[webpage].php on line 193 Show us the source and we may be able to help a little more.
  14. S

    DIV as Table?

    Read up on google. Making tables out of divs uses a good knowledge of the float: and display: css attributes... Something I can't help with. In my experience, div tables are just a lot more hassle than tables. I would just stick to tables, no point in changing unless you come across any limitations.
  15. S

    Split string

    Similarly, you can just use explode() if you split by null: // returns an array with each character: explode("Hello there!", "");
  16. S

    Image checkbox

    Ok... This is the PHP page I was testing it with: <?php print_r($_POST); ?> <script type="text/javascript"> var chkboxTicked = new Image(); chkboxTicked.src = "test/chkbox_ticked.png"; var chkboxEmpty = new Image(); chkboxEmpty.src = "test/chkbox_empty.png"; function submitcheckboxes(){...
  17. S

    Image checkbox

    $HTTP_POST_VARS is now deprecated... Use $_POST[] instead. To get whether the person ticked your checkbox or not, you just need to get $_POST['(Title of your checkbox img tag here)'] . The value should be 1 if it was ticked, and 0 if it was left empty. The code is probably buggy though... I...
  18. S

    Incorporating throbbers?

    Do you mean lije http://www.ajaxload.info/?
  19. S

    Php ini file

    The function you might be looking for is ini_set?
  20. S

    New to PHP and very confused...

    Need another } before the ?> of your first document. You should really think about formatting your work with tab and putting }s on new lines and such... Makes it easier to see mistakes. Also, I'm a bit confused with that $fields array definition you have... The {s and }s should be [s and ]s.
Top