I have a form where I ask my users for a comma seperated web site list. I want to make sure this list only contains the host names of URLs without any white spaces
Original list: [url], [url], [url],[url]
Edited list: [url],[url],[url],[url]
Currently I have the following to get the comma separated list
var list = document.getElementById( "list" ).value ;
I have a form where I ask my users for a comma seperated web site list. I want to make sure this list only contains the host names of URLs without any white spaces
Original list: [url], [url], [url],[url]
Edited list:[url],[url],[url],[url]
Currently I have the following to get the comma separated list
Code:
var list = document.getElementById( "list" ).value ;
In attempting to modify a script of a menu, that I wanted to add the ability to have sub menus, I first wanted to find out if an ordered list element, contained a secondary unordered list and what their names are so I could out put the items to the console.
I found a script on this forum that does almost what I want from this thread: [URL]. Instead of a dropdown, I'd like to have a list of names using check boxes, so that you have the option to send an email to one or all of the people. When you choose your selections and click submit, an outlook email will pop up with your selections in the to: field.
Here's the solution using a drop down, this works (and works well), but doesn't quite do what I need : <form name="Contact_Us" id="contact" method="post" enctype="text/plain" onsubmit = "getEml()"> <fieldset id="selection"> Who would you would like to email: <select name = "sel"> <option value="email1@email.com" >email 1</option> <option value="email2@email.com" >email 2</option> <option value="email3@email.com" >email 3</option> </select> <input type = "submit" value = "Submit the form"> </form>
<script type = "text/javascript"> function getEml() { var emailaddress = document.Contact_Us.sel.value; window.location = "mailto:" + emailaddress; } </script>
Is there a way to use checkboxes but to do the same thing? <INPUT TYPE=CHECKBOX NAME="name1@email.com">name 1<BR> <INPUT TYPE=CHECKBOX NAME="name2@email.com">name 2<BR> <INPUT TYPE=CHECKBOX NAME="name3@email.com">name 3<BR>
I'm trying to move a list of names from a textbox (jim;bill;sam;cathy;) to a listbox. My code so will move the name to listbox but all one line. I need the list the names in the listbox so that can click them one at a time. Please see my code. How can I modify it to fill the list one name per line?I don't want remove any names from the listbox till I click the "OK" button and overwrite what is in the textbox.
I have a form that I am using to generate an email with several user selected fields being part of it. As part of this form, I have a select box which allows the user to select which email addresses it should be sent to. The box works great except that the CGI script I'm sending the values to can only parse a single line for each field in the form. The issue comes into play when someone selects more than one value in the select box, the output of the select box seems to separate each value on a separate line using a line feed (or carriage return, I can't tell). The format that the CGI script needs is for a single line with each of these values separated by a comma. I'm confident that a javascript can do this fairly easily, but unfortunately, I am not very well versed in javascript. I've found a few code snippets on the web that I've mangled together, but since I don't really know what I'm doing, it isn't working out so good. I've included what I have in the form right now below (note that I've removed all of the other form data but the select box code to save space). Code:
Recently I was forced to change hosts for my wife's on-line business. On the previous host my JS for displaying date last modified worked ok. But on the new host it is not visible. The new host calims that my code must be wrong but I do not see how as it is unchanged. Before is the code
I am not sure that this is the right forum but will start here anyway - I have a web page with JS modules: jquery and jsoverlay. Everything appears to work perfectly on my test server in the office but when I load the same page from our main server the JS does not appear to work properly. Oddly though, other JS works without any problems at all. I just cannot see what I am missing here.[code]...
I'm trying to write a javascript that checks if a server/host is available. To be more precice. I would like to check if the browser can read an XML file from a server. If not the script should read the same XML file from a backup server. Does anyone have any idea how to achive that?
I won't lie to you. I'm trying to get data from html source from a 3rd party website. I'm NOT interested in stealing code,hacking,sending spam or anything sinister like that. I just want the content that is displayed but I need to get it automatically via VB. It's only publicly available price information but I don't think the website wants everyone to be scraping their info into a database.
Apart from the base URL, the site concerned navigates solely through javascript functions and session variables. I suppose what I'm asking is, is there anything out there that tells me (the syntax) of what my browser is actually sending to a website when I click a javascript toolbar/button/dropdown within IE.
I have designed a site. It's working properly in locally.Now I want to insert a special javascript on my home page.The job of that special javascript is, makes some errors in the site when site is going to publish on internet.
I'm embarking on a new project - although I've hit a wall.
I require a page to refresh at a scheduled date and time, several times a day.
For example, I would like the web page to reload the index at 3:15PM
So if anyone has the web page open during that time, it will automatically refresh for them.
Timing is quite important so I would need the script to use the server (hosts) time and not the end users time.
I am currently deciding on which server language to use, although Javascript is probably a suitable option? or would ajax be more the thing for this?
The webpage must execute the refresh at the time 3:15pm, so no matter when someone visits the page, even if its hours before, it must refresh at that time.
If anyone has any pointers on the best way to achieve this and what language to start with I am forever greatful :thumbsup:
I do a lot of image design work and although I have worked with a few coders in the past but I haven't gone too much into coding myself, but its something I'm going to take time to learn and get involved in, so I'm not looking for script hand outs here, mainly just a nudge in the right direction.
I need to get the domain of the page (mydomain.com) There seems to be 2 variables to get this info. document.domain & window.location.host - Both are set in FF & IE. So whats the difference between these ?
I'm new to javascript and PHP and I am wondering if there is a method or function to capture a 404 error in the event a particular html file cannot be found. I want to redirect that error to another page or design the code to send me an email telling me what page was selected and not found. In other languages I can trap such an error and respond to it.
I'm looking for an image cropping tool script that I can provide on my website for users to crop their uploaded photo on my site and I can store them directly on my host. (instead of having to go to another page, or open up photoshop etc, crop their photo, save, and then upload to my site) I see some websites providing this service, does anyone know any scripts that allows me to do this?
This is just a matter of best-practice, but i'm wondering whether it is best to host the jquery.js file locally, or to hotlink directly to the file on [URL]. I personally prefer to host it on my server, but if there are reasons why it's better to link to external file, i'd like to know them.
Code: var origGrp = ['James','Bill','Jennifer','Bob','Karen'];
replaced with something like this:
PHP Code:
var origGrp = [<? $sql="SELECT c.new_userid, c.fname, c.lname FROM ".$prefix."_club_users cu INNER JOIN ".$prefix."_users u ON cu.new_userid = c.new_userid
i have an ajax script that requests data from a database. Some of the fields contain html. I would like to know the easiest way to parse an xml file that looks like such:
<response> <poster>Poster name here</poster> <title>Title goes here, may contain a link</title> <text>html content here</text> </response>
i can't seem to figure out an easy way of parsing all the contents between a tag, what is the easiest way? I'm trying to fix a script that doesnt work when the text area contains html and i can't get it to work.
Is their a way of iterating thru each tag within a form and returning the value given in the id property, by that I mean the below html would return the values idBoxOne, idBoxTwo, idBoxThree from the FormXX form.
I have a Javascript that gets data from an XML document and displays it through javascript. The problem is that when I do dcfile.getElementsByTagName("subhead")[0].firstChild.nodeName all I get is #text. Can you tell me why? Code: