473,394 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Hyperlink works in Fire Fox but not in IE

I have this problem, we have a form on our website that allows the user to input multiple names or companies, however one of the options is to remove the current fields, we use a hyperlink to do the job, it works fine in Fire Fox but not IE, can someone please help, if I need to post the script I will do so
Jun 6 '07 #1
7 1197
So here is my script, this is just one of the examples, they are all pretty similare so if I can fix this problem then I can go from their, the "remove" hyperlink is what this question refers to, I will highlight the text and if anyone can give me input that would be great, if further info is needed I will provide thanks


script language="javascript">

/*
contains functions specific to this instance that is rendered from the partial
When this partial is rendered, we get a type (billto, party, etc) and sequence number
from the controller. We name all the functions around those two pieces to keep the function
unique. - rcaetano
*/

function selectRequestor_<%=@safe_description%>(text, li)
{
new Ajax.Request('/dashboard/get_entity/' + li.id,
{ onSuccess: function(request) { setRequestor_<%=@save_description%>(request.respon seText); } } );
}

function setRequestor_<%=@save_description%>(requestor)
{
data = requestor.split("|")
document.getElementById("request_document<%=@name_ description%>[address]").value = data[1];
document.getElementById("request_document<%=@name_ description%>[city]").value = data[2];
document.getElementById("request_document<%=@name_ description%>[state]").value = data[3];
document.getElementById("request_document<%=@name_ description%>[zip]").value = data[4];
document.getElementById("request_document<%=@name_ description%>[phone]").value = data[5];
document.getElementById("request_document<%=@name_ description%>[fax]").value = data[6];
}

new Ajax.Autocompleter("request_document<%=@name_descr iption%>[name]",
"autocomplete_choices",
"/dashboard/auto_complete_for_entity_name",
{ afterUpdateElement : selectRequestor_<%=@safe_description%> });
</script>

<table width="760" id="<%=@name_description%>">
<tr>
<td width="140">Name</td>
<td colspan="2">
<%= text_field_tag "request_document#{@name_description}[name]", nil, :size => 50 %>
</td>
<td align="right">[<a href="javascript:removePartial('<%=@name_descripti on%>')">remove</a>]</td>
</tr>

<% if @name_type == "copylocation"%>
<tr>
<td>Records Type:</td>
<td colspan="3">
<%= select_tag "request_document#{@name_description}[record_type]",
options_for_select(RecordType.titles)%>
</td>
</tr>
<% end %>
Jun 6 '07 #2
acoder
16,027 Expert Mod 8TB
Welcome to TSDN!

Where's the removePartial function?

PS. I've merged the threads.
Jun 7 '07 #3
Welcome to TSDN!

Where's the removePartial function?

PS. I've merged the threads.
Thanks for the welcome, glad to finally find some help: here is the remaining scirpt let me know if their is anything else I need to insert. This is the line I get the error message on in IE

<script language="javascript">

var current_name = "";

function removePartial(partial_name)
{
var element = document.getElementById(partial_name);
element.remove(0);
}

</script>
Jun 7 '07 #4
Her is the remainig script
Jun 7 '07 #5
acoder
16,027 Expert Mod 8TB
If you want to remove elements, you need to use removeChild (e.g. link)
Jun 8 '07 #6
If you want to remove elements, you need to use removeChild (e.g. link)

Thanks, but is their any other method by which to do this??
Jun 11 '07 #7
gits
5,390 Expert Mod 4TB
Thanks, but is their any other method by which to do this??
hi ...

that's the standard way ... you remove your option-node from the element-node that contains it ... use this method, that is the common and best way to do such things ;)

an other way would be to create your html for your select-box (all the options that should appear in your box) as a primitive string with javascript and then you set the innerHTML-property of your select-node ... but that is the very beginner way ... and creates a lot of code ... and lines in your script ... i wouldn't recommend that method ...

kind regards ....
Jun 12 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Tim Marshall | last post by:
I have a hyperlink on a form whose hyperlink property is set from a procedure and is pulled from a table. The procedure checks the value of the link in the table and prefixes it with http:// if...
1
by: Alex | last post by:
I am trying to select a hyperlink from a combobox (web addresses stored in a table) and launch the web site. Selecting from the combobox (ishyperlink=yes) does not launch the site. The same info in...
2
by: Doug Stiers | last post by:
I have an asp:hyperlink that I need to have some code fire when the link is clicked. The link is in a datagrid and the link is working properly. I tried using the OnInit event to call the...
10
by: Ian Kelly | last post by:
Hi All, Does anyone know how to execute a hyperlink programically? I need to create and send an email message, but I need to have the default mail editor loaded and populated with the message...
19
by: Joe | last post by:
I have an aspx page (referred to here as page_1) with a datagrid whose first column contains hyperlinks. When a user clicks one of these hyperlinks, he will navigate to another aspx page (referred...
2
by: Keith Wilby | last post by:
A2003, XP Pro. I have a text box on a form. The text box is bound to a hyperlink field. I want to use the contents of the text box in code so I'm assigning the contents to a string variable. ...
1
by: mjryan | last post by:
Any idea why this code would not fire? btnMakePmt.Attributes.Add("onMouseOver", "this.src='img\\MakePmt_nav2_over.jpg'") btnMakePmt.Attributes.Add("onMouseOut",...
20
by: tshad | last post by:
I had posted this problem earlier and just noticed that the Hyperlink is the problem. Apparently, it doesn't figure out the path correctly. It uses the path of the file it is in, even if it is...
1
by: gh | last post by:
I am using .net v 1.1. I use the code below to dynamically create a cell with a hyperlink and assign the link information. When I click on a link the window.open doesn' t fire. What am I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.