I have an html form and an icon, if i click on the icon, a new pop-up
window is open and shows a list of numbers with a structure like this
:
x.xx.xxx.xxxx.
Now, this numbers are between an <a href> tag and if i clic on one of
this, i call a javascript function, the idea is to put each one number
separate for the "." in a textbox, so i did it before but putting it
in a single input. Now i need to separate each one of this numbers and
put it in each one of the textbox. If i have to put it in a single
input iŽll do something like this:
<script language="javascript">
function Funcion(val)
{
//val value is 1.12.123.1234
window.parent.opener.document.txtCtaNiv.value=val;
top.parent.window.close();
}
</script>
The code above puts the value (that previosuly i selected in the popup
window) in the input field of the main form. That's easy.
Now if the parameter val has the value 1.12.123.1234 and in the main
form i have four input fields called txtCtaNiv1, txtCtaNiv2,
txtCtaNiv3, txtCtaNiv4, how can i separate the parameter val?, so i
can put the 1 in txtCtaNiv1, the 12 in the input field txtCtaNiv2, the
123 in txtCtaNiv3 and so on?
How would I seperate a text string such that it would appear on seperate lines ie. Initial Input: StrMsg = "This is an example of a string that will appear on seperate lines" "Hoping that this fully works, there will be no errors and all will be well" "This is the last line of text."
I am currently trying to create a simple form based web-page (uploaded here [URL] that creates a query for a WMS (Web Map Service).
The page consists of about 10 different forms, which are all put together in a (string) variable named "compiledQuery" in a function named "compileRequest" which is activated via a button. I would like to print out this variable on the page so that the users can see the query for themselves. After doing some research I came to the conclusion that the best way to do this would be via an iframe (I do not want to use a pop-up). The function I use to do this is:
function printRequest() { var query_frame = document.getElementById('frame_compiled'); query_frame.document.write(compiledQuery); } "frame_compiled" is the name of my iframe: <iframe name="frame_compiled" width="400" height="125"> </iframe>
I know that "compiledQuery" has been assigned a value (I used an alert with the value). Hence, I also know that the "prinRequest"-function works on principle... However, it seems as if I am having problem with retrieving the name of the iframe to the function (I tried doing an alert with the value, it was returned as null).
So, I suppose my question is this: How do I properly retrieve the value of the iframe, and am I on the right way using document.write to show the value of "compiledQuery" to the users? Or should I use another way of doing this completely?
I am using the "lightbox" effect to open my images which uses javascript. I am also using jQuery for the changing banner at the top of the page. Ever since I put the jQuery script in, the "lightbox" script stopped working. When I remove the jQuery script, the "lightbox" script works again. Obviously they are conflicting for some reason. I have included the relevant code below.
I am opening a new small window through javascript.
Here is the code:
But on the same page I have another link for a new window which is essentially the same code:
As you can see in the red text, one link should open map.asp and the other should open pofull.asp... but they BOTH open in pofull. So I have tried to change the function name for one of them but then it doesnt work at all.
I have tried everything to separate the two scripts but nothing has worked.
Is it possible to load a separate page into a div tag using Javascript? or doo I need to resort to C# and ASP.NET? What I have is a main page with one content div I wanted to switch based on which heading item a user chooses. I know I will probably need to set the other pages to a fixed width which is fine.Might it be easier to just make my content into an image and load the image? There will be a few lines of text in the image.
I there any possible way to set this up so the menu is in a separate javascript file? This way I could just link to the menu on the pages I need it to show up.
I want to separate textarea from input in my HTML form! I have done it but it's ugly and slow and not useful. I want to do one loop through my whole form and separate one from the other so I can specify how to pull the value. The form is PHP and very dynamic so I don't know the names of the fields.
I have this function among many that houses forms. I'm also using an ajax page that is supposed to deal with form's entries and insert everything into my DB and I don't know how to separate the different requests on the ajax page so that it can do what the correct request is.
I've used a function to out put two lists, - loco numbers and loco names - which I want to display side by side on a page, either in two adjacent divs or in a two-column table so that viewers can straight away reference the numbers with the associated names.
I can output it as a document.write - but that just results in one continuous list of numbers and then names. explain how to output the two lists in two separate divs.
I am having trouble with multiple slideshows. I have two seperate and I am trying to fun them on the same intervals. The second slideshow stops.
<script type="text/javascript"> <!-- var image1=new Image() image1.src="ciscoflash/01.jpg" var image2=new Image() image2.src="ciscoflash/02.jpg" var image3=new Image() image3.src="ciscoflash/03.jpg" var image4=new Image() image4.src="ciscoflash/04.jpg" var image5=new Image() image5.src="ciscoflash/05.jpg" var image6=new Image() .....
Attempting to develop [URL] The site uses the onclick() to call a random link.All the links seem to be heavy on the page.Is it possible to store them elsewhere, like a separate webpage?
I'm trying to populate a dropdownlist with 4 seperate dates that will update at the start of each week listing the current week 1st and then the next 3 weeks afterwards.
I have code for finding the current week date and the next 4 weeks with javascript, however I am hitting a brickwall trying to get this code to appear in the html dropdownlist.
[Code]...
I know my code at the bottom for the dropdownlist is wrong but I can't figure out where I'm going wrong here.
What I am wanting to do is simply call a different CSS file based on what browser they are coming from. I want the script to detect IE, firefox, and Safari.
I have several forms on the same page that need to use the datepicker plug-in. I have datepicker working PERFECTLY on one form. Now I need to add other forms on the page. I haven't been able to get two datepickers working on the same page nor can I find any documentation on whether it's possible. What do I have to do to get two datepickers working in two separate forms on the same page?
Really struggling trying to get 2 seperate sliders to work on my web page.
take a look at;
[URL]
not a spam its test site so nothing to gain from my end.
the slider at the top works fine, but the 3 boxes with the arrows underneath should scroll/slide back and forward when clicked. If I remove the js links for the top slider the bottom then works;
I'm trying to make a page where you can change a page's layout through 2 separate CSS's via a button. i want to button to change text when it toggles the layouts as well. i have no clue how to do this with an entire CSS file, but here is something i made to change the background. could i use this logic to change the CSS of a page?
I was working on this problem that asks me to return an array of scores for each string (only for its content part, not URL) in the global variable, which is an array. For example, alert a score of 0 if the string z is not found, 1 if found once, and 2 for twice. My problem is that I can get the code to alert if it has found the word (ex. "the"), but I cannot manage to :
a) Assign separate scores for each string.
b) Make the search case insensitive i.e. "the" will appear in 0,1, but not in 2, where it is capitalized
[CODE] var c = ["[www.facebook.com] Facebook is the best social networking site to coccent with your friends. ", "[www.google.co.uk] Google is the worldwide search engine. ", "[www.bbc.co.uk] The best news source for starting your day. "]; function findScore(z) {