Jump to content

rem

Members
  • Posts

    42
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rem's Achievements

Member

Member (2/5)

0

Reputation

  1. Hello, I was struggling with this one for some time and can't find a solution. Can anyone advice how to keep the nice URLs while I'm navigating out of the current rule page. ex: for index.php page I have the following rule: RewriteRule ^(.*).html$ index.php?p=$1 [L] which allows me nice URLs like: about_us.html, instead of index.php?p=about_us but what if I need to go to another page (or link to another page) like gallery.php?g=50 from index.php? What should I do to have the links like that instead of gallery.php?g=50 Thanks a lot and I really hope this makes sense. Regards, Rem.
  2. this is what i did function focuss (id) { var divs = document.getElementsByTagName('DIV'); //lets say each one has a classname of focus div var count = divs.length; //do this here instead of inside of the loop for (var i = 0; i < count; i++) { if (divs[i].className == 'focus_div'){ divs[i].onclick = highlight(id); } } } function highlight(id) { //use this space to reference your funtion that will handle the highlighting document.getElementById(id).style.borderColor = '#ff0000'; } and the html <div id="pb-header" class="focus_div" onclick="focuss('pb-header');"> text here </div> <div id="pb-bg-heading" class="focus_div" onclick="focuss('pb-bg-heading');"> some text here </div> even though the IDs are pointless here sine we're triggering the focus state with the "focus_div" class but there's no other method I'm aware of to make it happen otherwise... I'm really sorry for bothering you like this but unfortunately my javascript knowledge are almost none please advice how to go further.. thanks!
  3. Thanks a lot for the latest post and I'm sorry for the late reply... I was away for one week. I'll see about that on Monday and post the result here asap. Thanks once again.. Best, Rem.
  4. Yes, that's about what I need! Thanks for the tip... very interesting indeed!
  5. <script type="javascript"> startDivs = function () { var divs = document.getElementsByTagName('DIV'); //lets say each one has a classname of focus div var count = divs.length; //do this here instead of inside of the loop for (var i = 0; i < count; i++) { if(divs.className == 'focus_div'){ divs.onclick = function() { //use this space to reference your function that will handle the highlighting alert('asdasda'); } } } } window.onload=startDivs; </script> <div class="focus_div">click me 1</div> <div class="focus_div">click me 2</div> this is what i've done but unfortunately it is not working what on earth am i doing wrong? thanks for the help!
  6. As far as I know, in IE, hover is not functional for other elements than links but I really don't understand what are you suggesting... I don't need a CSS hover behavior and don't need a CSS general styling of the DIVs... What I need is when a DIV is clicked to be highlighted by JavaScript (already accomplished) and when other DIV is clicked, then the initial highlighted DIV looses focus (it's style is cleared) and the last clicked DIV is highlighted and so on... Thank you..
  7. Hey, I manage to come up with this (there are no radio buttons involved just divs. i said "radio button" like functionality): function focuss(id) { if (document.getElementById(id)) { highlight(id); } } function highlight(id){ document.getElementById(id).style.borderColor = '#ff0000'; } Now the clicked DIV is highlighted but the big questions is... how to clear the rest of the styles and highlight only the current one? If I click a new DIV, that's also highlighted and the next one as well until I highlight all of the DIVS... The "active" DIV only should be highlighted, rest of them should be cleared once the focus is lost. Thanks a lot for your help emehrkay, I really appreciate it. Regards, Rem.
  8. This sounds... like it I will try to wizard it into a solved topic. Thanks a lot for your time, I really appreciate it. Promise I'll get back with the result
  9. Hello all, I'm trying for a few days to do something with javascript but this is not my strong point at all and I failed each time miserably so I thought to ask for help here. Please point me to a good tutorial or help me to achieve a "radio button" like behavior for a bunch of block level elements. ex: onclick a div is highlighted and then cleared when other one is clicked (this is to show users that certain part of an application has gain focus) Thank you very much in advance and looking forward for your advice. Regards Rem.
  10. Yes, indeed ... such a great idea and so simple. I don't know why i thought it should be very complicated... Thanks!
  11. Hello all, Could you please be that kind and point me to tutorial or let me know where to find out how to start building a basic template system for a ticketing system application emails? Something like: Dear %user_name%, Your ticket regarding the issue with %ticket_subject% etc.. etc... Thank you, Rem.
  12. i'm really sorry, i wasn't asking you to do it for me... i really don't know how, but i'll try harder. thanks for all your help!
  13. And another thing is that if a lower level of links is added, a sub-sub link, the script is displaying another main link with a child, instead of hierarchically display it along the tree... ex: [1] => title.html [2] => Array ( [0] => subtitle1.html ) [3] => Array ( [0] => subsubtitle1.html // this should be a child of subtitle1.html ) )
  14. That's perfectly fine! This is how i need it to do. This code is great, thanks a mil, except instead of links I have numbers! The array needs to be Array ( [menu1] => title.html [menu2] => Array ( [submenu3] => subtitle1.html ) ) instead of Array ( [1] => title.html [2] => Array ( [0] => subtitle1.html ) )
  15. Thanks a lot for your answer but that's not what I meant. It's my fault, I had to explain it better: Let's consider the following MYSQL records: ID title path parent =========================== 1 menu1 path1.html 0 2 menu2 path2.html 0 3 menu3 path3.html 0 4 submenu1 path4.html 3 5 submenu2 path5.html 3 and so on... I need those records fetched from MYSQL and hierarchically inserted into a multidimensional array to be like the one in the example above. That's the transformation I need! MySQL data -> Array() ... Thanks!
×
×
  • 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.