-
Posts
5,717 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Adam
-
Not tested but you could try this, or something similar.. In the head: <script type="text/javascript"> function copyID(obj) { var id = obj.innerHTML; id.execCommand('Copy'); return true; } </script> ... and in the body: <a href="webform.com" onclick="copyID(this);">ID: 12345</a> As I said not tested! Adam!
-
Flip the page? Be best off using a JS framework like jQuery .. will make animation and such a lot simpler for you. Adam!
-
At the minute you can delete the cookies and upload again...
-
Do you mean when they select the room, you want the data to display instantly? Or to just submit the form without having to press submit? Solution to the latter is to just add: onchange="document.form_name.submit();" ... to your select element. Adam!
-
Risky? Not really, if you know what you're doing and secure your system... SMARTY templates allow you to add in multi-lingual support, not by default but there are classes available you can add to give that support. We use it at work and our website is available in about 10 languages, I have no complaints. Generally the idea is in your templates you encase text in translation tags, something like {t}hello{/t}, and then the translations are looked up from an XML file or ".po" file. Definitely beats having several versions of the same file... Regards
-
You'd want to use a 'factory' pattern.. http://uk3.php.net/manual/en/language.oop5.patterns.php Regards
-
What is the best SEO tactics for the subpages of the site?
Adam replied to qaokpl's topic in Miscellaneous
Ha.. 20? That's not large! It's always an advantage if you can use different keywords and descriptions for each page, but obviously sometimes that's just not feasible. I think the best thing you can do is read through an article so you properly understand how to use the title and META tags... First result on google! I actually had a quick skim through and it should answer all of your questions. Regards -
Layer 1? As in, the pop up wrapper div? Looks like the actual pop up HTML is just within the <body>, hidden with "display:none;". So whatever ID you use when calling the pop up - e.g. showPopup('mypopup'); - then you'd just use: var layer1 = document.getElementById('mypopup'); // 'layer1.innerHTML' would now contain the content! Is this what you were looking for? Regards
-
I'm guessing you want this to happen without submitting any forms or anything then? So like when the user clicks the check box, it's automatically added to the shopping cart without refreshing the page or submitting a form? Regards NB This is the PHP board, not JS!
-
The login & registration forms still don't support pressing 'enter' to submit! "527 is the difference Garry (offline)" ... Eh? Everything's still way too slow, especially posting messages and the "Loading Shoutbox.." screen. By the way do you keep deleting users from the database? I've had to register every time I've visited it - a "remember me" function would be nice as well... Adam!
-
[SOLVED] Limit text in an area, and click button to view all?
Adam replied to Jason28's topic in Javascript Help
Just to add... You don't need to add a # to your URL to escape this. There's several ways... You can call the JavaScript from the 'href': <a href="javascript:showHide(1);" id="display_1"> But that displays the JavaScript in the status bar and some people don't like that. You could have the 'onclick' event return false, which would stop the browser loading whatever is in the 'href': <a href="#" onclick="showHide(1); return:false;" id="display_1"> Or you could use void(0); instead of #... <a href="javascript:void(0);" onclick="showHide(1);" id="display_1"> Adam! -
There's nothing wrong with that code. Perhaps the problem lies with the context is used in? Or maybe there's a problem with the rest of your JavaScript. Do you have a link? Adam!
-
Try changing the function to: <script type="text/javascript"> function Display(num) { var text1 = document.getElementById('text1'); var text2 = document.getElementById('text2'); if (num == 1) { text1.style.display = "block"; text2.style.display = "none"; } else if (num == 2) { text1.style.display = "none"; text2.style.display = "block"; } } </script> Adam!
-
No problem. Seems fixed now...
-
Perhaps this is the problem: rows="163*,298*" I'm very rusty with frames but I believe it should be something more like: rows="200,*" (...200 is a rough guess as to what the size of the top frame should be) Adam
-
It's nice... though there is room for improvement. Loosing the back button is a little annoying, and so's the login failed type message pop up you have! Also are you aware at the minute posts don't seem to update in the messages box? Overall it's pretty decent! Adam
-
... Just checked it in IE7 and there's a scroll bar! IE rendering issue... I'd personally recommend not using frames!
-
Using FF3, 1280 x 1024, don't see a scroll bar. When browser window's reduced to about 800 x 600 one does appear though underneath the menu... What resolution are they using? Adam
-
Where's "CreateUserLink($code)" come from? Can you post the code from that function as well..
-
You don't have to replace it with JavaScript, simply add JavaScript validation as well. You should never rely on JavaScript as validation as it's client side and the user can simply disable it. You'd be best off reading a tutorial on this so you understand better. Millions available on Google, just the first result. Adam
-
Same here - in fact this is the most posts I've ever had on a forum. Picked up a lot when I started working my current job, and seen as I do work with PHP, I find it pretty easy to solve problems as you're already in the right mindset.
-
Why not try "Help" > "About Internet Explorer"?
-
javascript:document.getElementById(id_tb).style.display="none"; "javascript:" is for inline JavaScript. Also having the style.display = "" could be causing an error, use "block" instead. Try: function ShowHide(id_tb) { var tablebody = document.getElementById(id_tb) if (tablebody.style.display == "block"){ document.getElementById(id_tb).style.display="none"; }else{ document.getElementById(id_tb).style.display="block"; } }
-
I wasn't actually trying to find out what Neko-Network is, but more point out the fact that after a minute or so of browsing the site I still had no idea - and left without knowing, obviously never to go back. http://www.indextree.com/blog/web-design/top-ten-worst-design-mistakes.html - to be honest I'd have put frames on that list, and contrasting colours making it harder to read text.
-
If you just want the current month to be preselected, another dirty way... $months = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); foreach ($months as $key => $month) { $selected = (($key + 1) == date('n')) ? ' selected' : ''; print '<option value="'.($key + 1).'"'.$selected.'>'.$month.'</option>'; } Not tested but should work no probs!