Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Chrex

  1. But how can I set a link behind the button? Putting the href in the button doesnt work: <button class="123" href="abc.html">abc</button> Putting the button-class in the link doesnt work too: <a class="button" href="abc.html">abc</a>
  2. Thanks a lot. It would probably be better to link buttons and html, right?
  3. Hi there, can you just use a button to "submit" and "delete" something? Im planing to have a "link"-button. Is there a tutorial for buttons? I want to learn how to create and design buttons. Thanks for your help, Chrex
  4. Got it <?php$csv = array();$file = fopen('myfile.csv', 'r');while (($result = fgetcsv($file)) !== false){ $csv[] = $result;}/*******************************************/$i="0";for ($c=0; $csv[$c][0] =< $postalcode; $c++){$i=$i+1; }$postalcoderow = $i;/*******************************************/fclose($file);/*echo '<pre>';print_r($csv[$postalcoderow][$columnnumber]);echo '</pre>';*/?>
  5. Hi guys, here is what I have: an excel sheet (XLS, 4MB) with postal codes in the first column more data in the other columns here is what I need: looking for the postal code in the excel sheet get the information to this postal code from the other columns work with the other information (use them as variables) example: PC | A | B | C 1234 | 2.3 | 3.5 | 1.1 2345 | 3.3 | 3.3 | 7.8 ---> If I have the postal code 2345, I want to create the variables $a=3.3 ; $b=3.3 ; c=7.8 in PHP here i
  6. Thanks to everyone again, especially to Ingolme (he delivered the solution). The formate of the script was ANSI, so I had to change it with "Encode in UTF-8". No idea why it didn´t work right away after clicking on "Encode in UTF-8", but after a few conversions (ANSI, Encode in UTF-8, Concert to UTF-8) it works. You can´t do this with Expression Web 4, I used Notepad++. Hope it will help someone with the same problem. Cheers, Chrex
  7. It says: UTF-8
  8. Expression Web 4
  9. hmmm, my page works with UTF-08: <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> ...and my script too: <script type="text/javascript" charset="UTF-8" src="show.js"> Everything works, when I replace "m³" with "m". How I said, I had the same problem with "ä, ö, ü", but I could solve it by using "u00f6". But u33a5" doesn´t work for "m³".
  10. @Jonathanks: I tryed this "<sup>3</sup>" already...it doesnt work. @Ingolme: The variable is set in front of the "if-code", right after the start of the function. function show_selection(){var abc = document.getElementById('abc').value; if (abc == "m³") { var variable = "m³"; document.getElementById('show').innerHTML = variable; }}
  11. Hmmm, the alert says: m³
  12. The problem has to be the "if-code". The "if" doesn´t agree that abc == "m³". I figured that out by changing the code to: if (abc == "m³") { var variable = "m"; document.getElementById('show').innerHTML = variable;} If the "if-code" would work, I would get "m". I´m very sure the innerHTML works, because it does work with all the other variables.
  13. Just found something which says "UTF-8".
  14. Hmmm, thanks for the link. I found this: "u33A5", but it doesn´t work. My files should be saved in the right format, because it works with "ä", right?
  15. @Foxy Mod: That doesn´t work for me. I also use the value in php and it will be shown at one place, so it needs to be "m³". @justsomeguy: "doesn´t work" means, my script/function doesn´t work with the value and doesn´t show the value. I had the same problem with "ä" and I could solve it by replacing the "ä" with "u00e4". I thought there is something like that for "m^3".
  16. Hi guys, I need to work with "m³". The function in my script gets a value from a selection. I have 10 seletion options. It works fine with 9 of them, just the "m³" doesnt work. I read something about unicode, but couldn´t find the right one (if it exist für ^3). I also had a look at the w3 js pages (number, math), but that didn´t help too. if (abc == "m³") { var variable = "m³"; document.getElementById('show').innerHTML = variable;} Thanks for your hints, Chrex
  17. Hey guys, It finally works :)I found the following code here: http://codingforums.com/dom-json-scripting/247911-javascript-onchange-event-select-tag.html No idea why the other code didnt work, but here is the (for me) working one: <script type="text/javascript"> function show_selection_value(){ var value = document.getElementById('ID-of-my-select-box').value; document.getElementById('target').innerHTML = value; } </script> <div id="target"></div> Thanks again for all your help!
  18. But how you can see in the script (post #5), each element has a value. So how could the string be empty then? I´ve never worked with the developer console before.
  19. Why should "this.value" be empty? Doesn´t the script fill the string? It works on the other website. The alert box doen´t appear on my website.
  20. Shouldn´t alert(option.value); or show.innerHTML = this.value; show the element on my website? I don´t get an output.
  21. I did read your post, otherwise I wouldnt have looked for "onchange". I tried to work with your suggestions and your code (last 2 days), but it didn´t work. I don´t want to say that you provided something wrong, I´m probably just to new to JS to understand how to use it propperly. I´m "just" an engineer, not a programmer. Still don´t understand why the script, which I posted, doesn´t show me the selected element. It works so nice on the website where I found it.
  22. Thanks for your help again! "onchange" is what I was looking for. I found the following code. Do you think thats correct? The script doesnt show me the selected element :/ Source: http://www.mediaevent.de/javascript/onchange.html <select id="sel"> <option value="Stiefmütterchen">Stiefmütterchen</option> <option value="Primeln">Primeln</option> <option value="Tulpen">Tulpen</option></select><script type="text/javascript"> var sel = document.getElementById('sel'); sel.onchange = function() { var show = document.getElementB
  23. Thanks for your reply. I´m using "select" in my code, that was just a typing mistake. If I´m right, you use name="" for PHP and id="" for JS?! Why doesnt the following work: clicking on a selection and the JS (which is below the selection) is using the selection variable? Isn´t there a way to say:"hey, you are my JS variable, be used in the next JS."?
  24. Hi guys, I use a very big form and my variables will be saved in a session. In most cases I´m fine with PHP. Until now I just use JS to hide and show some options. My idea is to give the user a selection (somewhere in my form). As soon as the user clicks on one of the selection options, the value of the variable shall appear as text below the selection options (not just in the selection options). 1. Idea - import the php-variables in my JS and work with it <script type="text/javascript">var test ="<?php echo $test ?>";</script> --> didnt work. I could wo
  25. So easy....I took option (2.). It was just the position of the script. Thanks!
  • Create New...