Open URL Either In A New Window Or New Tab Based On User's Choice?
Nov 14, 2011
I am facing an issue where a link on my website opens in a new window if you simply click on it. However, if you right click and say open in new window or new tab, it opens the same window (URL) again from where the link is clicked.
Self Service Option is a link and the JSP calls a function getSelfServSite() when the link is clicked. This is how the code flows in my case
function getSelfServSite()
{
getToTheLink("${myConfigInfo.selfServiceURL}");
// this is because the URL is configurable
[Code].....
I want it to go to the right link no matter how the user click it.
View 1 Replies
ADVERTISEMENT
Nov 4, 2010
i installed a shout box for my users, its integrated by using session username. but what i want to do is have a username list under the shoutbox that shows which members (usernames) have the box open. that way the other members can see someone is out there to see their message.. one alternative would be to just have the shoutbox auto open (which i need to learn how to do) as soon as they sign on to the site, but what if they close it right away i still have the same issue (they cant see the message that someone is sending them) here is how i open the window now, they have to click on the link.
<a href="#" onClick="javascript:popup=window.open('shoutbox/minichat.php','SHTB','status=0,menubar=0,resizable=0,scrollbars=0,width=297px,height=300px');"><font size="2">Shoutbox</font></a>
so how do i know which users have it open? and how to i autostart the shoutbox? (do i used onload and onunload?)
View 5 Replies
View Related
Jul 18, 2010
Is there any javascript code that I can use in "window.open" that will pop up a window of whatever the user has set as the default browser window size? (This should be the size of the browser window when they first open it)
Also, any code to go to the user's defined homepage as set up in their browsers preferences?
View 4 Replies
View Related
Mar 2, 2009
I need to find a way to open a new _blank type window when a user submits. I have found a few answers but none that fit what i need. alot tell you to use target blank on submit, but i have two buttons that do 2 completely different things. Is there a way to achieve that? here is the code i use!
<form name="done">
<div class="photoContainer">
<p class="process">Photos Successfully Uploaded</p>
<div class="processbtns">
<input class="button space" type="button" target="_blank" value="View Photos on ebby.com"
onclick="window.location.href = 'http://www.ebby.com/details/<?=$propid?>.html';"/>
[Code]....
View 3 Replies
View Related
Nov 25, 2005
I need to create an application that will open a popup when the user closes a window. I can do that easily via onUnload event of javascript but the catch is that the popup must open only when we close the window and not when we submit a form or click a link on the page.Actually it is a survey which opens only when one closes the window.
View 4 Replies
View Related
Jan 9, 2009
I have this website that logs users clicks and their referrals clicks. I have graphs for each of these things. I currently have it working that when a user clicks a link on a page, it opens up another page and shows the graph. I want this to be sort of like a "drop down" window when they click. Here is a picture of when the link is not clicked: And when the blue circle (the thing boxed in red) is clicked:
View 4 Replies
View Related
Sep 23, 2011
I have a web form that I'm creating and it has some expandable checkboxes that need to be restricted based on choice.
This is my criteria:
If someone chooses checkbox number 1, they cannot choose any other checkbox.
If someone chooses checkbox number 2, they may also choose number 3 but not 1 or 4, they must also answer the question that appears below.
If someone chooses checkbox number 3, they may also choose number 2 but not 1 or 4, they must also answer the question that appears below.
If someone chooses checkbox number 4, they cannot choose any other checkbox, and must answer the questions that appears below.
One more caveat: If checkbox number 2 is chosen, and they've filled in all three lines of the question below, I need for them to dynamically add more lines as needed.
I have attached my web form so you can see what I've done. I've researched these options and tried code from various examples but I can't seem to get it to work.
View 15 Replies
View Related
Jun 22, 2011
I have a select box where the value must be passed via the form. If the users selects choice B or Choice C then I want a specific div to show. If they choose choice A then I want the div to hide or remain hidden. It should be hidden on page load.
Code:
View 1 Replies
View Related
Jun 22, 2011
Ok so I have a select box where the value must be passed via the form. If the users selects choice B or Choice C then I want a specific div to show. If they choose choice A then I want the div to hide or remain hidden. It should be hidden on page load.
<select name="Event_Type_ID">
<option value="1">Choice A</option>
<option value="2">Choice B</option>
[code]....
View 2 Replies
View Related
Jul 20, 2005
I'm trying to use window.open from inside a user defined function, and
it's not working.
Mountain Man
============
<script>
function openFootnote(contentURL) {
window.open('contentURL','footnotes','height=180,w idth=160');
}
</script>
I've tried calling on the function 2 different ways, as shown below.
Nothing happens either way.
<a href="javascript:(void)" onClick="openFootnote(fn1.html);">...</a>
<a href="javascript:(void)" onClick="return
openFootnote(fn1.html);">...</a>
View 2 Replies
View Related
Feb 16, 2009
I want to make different style of alert box on my code how to make user choice alert box.
View 1 Replies
View Related
Jun 7, 2009
I have spent the last 6 hours working on this, and I am about to lose my sanity. I need your help very desparately. I want to create some radio buttons for building a computer for a class project. Basically, what I have now is the radio buttons in separate groups, and a function that calculates the total price of the items selected. But what I am finding impossible to get is this: I need to set it up such as that if you select a radio button in one group, it disables part of the second. What this means in my work, is that say I choose AM3 as the CPU socket, only AM3 motherboards and processors will be enabled, and the rest in these categories will be disabled.
I am trying to set it up in a way that when you first open the page, cpu, motherboard and ram groups all disabled, then based on your socket choice you get different options for motherboards and processors, and then based on your motherboard choice you get different choices for RAM.
View 5 Replies
View Related
Feb 12, 2011
I am working on a little project here. I have two arrays (States, Cities) I am trying to allow the user to chose one from a select form (Choice) and then have the values of the chosen array displayed in a alert(). Obviously I could just write an if statement and display the required content depending on whether the value selected == States or Cities. But this project is just a placeholder project for me to figure out one aspect of a much larger project I am working on. And it is important for the result to be chosen dynamically as in the final project I won't know the values that the select field is being filled with.
What I need to do is take the value returned from the select field (Choice) and turn that into the name of the array and display that. If I use this code alert(States); then it returns the values of that array. But like I said I need to be able to dynamically select what array to display based on users input.
alert(document.getElementById("Choice").value); returns the value chosen. How can I take the value chosen and actually display the value of the array with that same name. In other words let JS know that I don't literally want it to display the value chosen but rather the value chosen is the name of the array I want it to display?
Pseudo code
x = document.getElementById("Choice").value;
x is name of array;
alert(x);
View 2 Replies
View Related
Aug 2, 2010
What I would like to do is have a page with a dropdown menu, and depending on which option the user chooses from the dropdown, reload the page and display a particular iframe below the dropdown, based on the users choice. Also, a default iframe would load (the one connected to the default choice in the select box). I was trying to make this work with PHP (without having the user having to click a submit button) but I couldn't find a way to make it happen.
View 6 Replies
View Related
May 30, 2011
Is there any way to enable a form element(s) based on the selection in a <select> drop-down? I'm trying to enable/disable a group of checkboxes depending on which option is chosen in the <select> above it.I know how to enable/disable something when a box is checked (or text is entered into it) but I have no clue how to handle the <select> option.
View 2 Replies
View Related
Aug 10, 2009
I want reset user choice of radiobutton here is my code
[Code]..
but in some reason it doesn't wotk ,what is wrong with it?
View 4 Replies
View Related
Aug 30, 2011
I found this forum while running out of ideas and being extremely desperate to fixing a probably small javascript error in a script. the script is supposed to open a small form window that allows the user to input an email address and update it to proceed. the form item is initially unchecked, but as the user clicks it and enter his email address, it updates the value of the email address and the box becomes "checkable". the problem is that with both IE and firefox, the box doesn't close again, doesn't get checkable and basically doesn't work. in the firefox debugging console, I found the following error:
Quote:
The part responsible in the javascript for this section is:
Quote:
And the html code that is supposed to pop up the box is:
Quote:
View 1 Replies
View Related
Jan 22, 2010
Not sure if this should have went into the php or javascript forum. I am trying to setup a script that will automatically population a html selection option based on the choice of the previous selection. If hard code everything it will work fine example manufacturer is currently being populated dynamically when the pages loads. The issue is I am can't pass pass the manufacturer variable through to be processed to only retrieve the models for that manufacturer. The code also uses a standard ajax script which httprequest in it.
[Code]....
View 1 Replies
View Related
Nov 2, 2009
I am creating dynamic questions and question's choices (radiobuttons or checkboxes) from database when runtime..after users answer the question, press next button to pass the next questions
For example
1) Question definition
a)choice definition
b)choice definition
c)....
Users have to choose any choices..if not, my system is giving alert, Actually my problem is about checkboxes. I created hidden textboxes, if question choices' type is checkbox. So the last choice definition is name "Other". If user checks the other choice, the hidden textbox is going to be visible. It is all okay until here. I want to give a error alert if user checks the other choice and doesn't fill the textbox when press next question. I don't validate this. How can i do it.
View 2 Replies
View Related
Mar 25, 2011
I have been away from development for a while and I'm looking for a way to get back into it. I have two questions:
1) Is the choice of javascript framework independent of the choices of all the other application parts like the object-relational mapping layer, the app server, etc? Right now, I'm looking at JQuery, and ExtJS.
2) Does anyone know where I can get a complete sample application made of open source parts and using all the best practices that I can just copy to get started?
And I mean complete... as if a real life functioning enterprise the likes of Google just zipped up their whole open-source production and development hard drives and made it all available for people to download, unzip, and run... mysql database, bug tracking system, build system, version control, connection pooling services, web server, app server, javascript libraries, internationalization resources, configured IDE, etc. etc. All of everything configured and wrapped up in a single zip file ready to go with just a few changes to IP addresses and passwords. From that we could just change things to build our own first app.I've tried getting started with a bunch of different open source application stacks and I always get stuck. And every time it happens I wonder why I can't just copy someone's entire web development folder. It's open-source and it's just ones and zeroes. Why can't we just copy it and skip the setup process and the time of figuring out best practices on our own?
View 1 Replies
View Related
Apr 5, 2009
I need to know if the user close the browser or to open the window � browser without or with a disable close window button How can I???
View 6 Replies
View Related
Feb 18, 2005
I have a form that opens a new window when submitted.
However, many people don't like new windows opening. So, I would like to create an option that would let users control whether the form result opens in a new window or in the same window. Can this be done?
I was thinking of adding a checkbox and if it would be chacked = new window, not checked = same window. How can I accomplish this?
View 2 Replies
View Related
Feb 7, 2009
I have this piece of code which is opening link in new window:
How to change this code so link would open in the same window?
Probably I should change this part: javascript:void window.open
View 1 Replies
View Related
Mar 16, 2009
I'm trying to create two bookmarklets:
1. Take the current URL of the page and open a new window with a URL based on the current page. Some examples (I use "->" to mean "this URL turns into that URL"):I plan to use these bookmarklets in sequence, first pressing 1 to log into the CMS, then pressing 2 to edit the current page.
View 5 Replies
View Related
Jan 17, 2012
I have a problem on the links on my page im working.sorry guys still a noob and my english is not that good. :b. my question is like i have a list of packages of food. [link_a] [link_b] [link_c] and i have a function that i put in my head tag:
function linkA()
{
window.open('link_a.html','link','width=300,height=200,resizable=yes');
}
now i can go to linka.html by click my link <A HREF="javascript:linkA()" >link a</A> is there a way i can have one functions that can open a link depend on what page .when it clicks then go to its designated page or i have to stick on writing function for linkB ,C,D and so on.
View 7 Replies
View Related
Oct 19, 2011
How to open a link on the same window using window.open or any other method in JavaScript.
View 2 Replies
View Related