I'm sorry to be posting OT... but I've got a _javascript_ problem that's
plaguing me.
I have a CF page that spawns this 'people picker'. The problem is, when I
choose a person from the list it generates (see the cfoutput from the
'search' query) I get the _javascript_ error: 'Error:
window.opener.document.forms.adduser.user_id' is null or not an object'
Can anybody offer any insight? It would save me from becoming bald. :)
--
Jillian
*** *** ***
<cfif IsDefined("url.action")>
<cfset action = "">
<cfelseif IsDefined("form.action")>
<cfset action = "">
</cfif>
<html>
<head>
<cfoutput>
<title>#site_title#</title>
</cfoutput>
<link rel="STYLESHEET" href="" type="text/css"
title="Styles" />
<script language="_javascript_">
function addUser(id)
{
window.opener.document.forms["adduser"].user_id.value = id;
window.opener.document.forms["adduser"].submit();
}
</script>
</head>
<body>
<!--- Default screen --->
<form method="post" action="">
<p align="right">
<a href="" Window]</a>
</p>
<table border="0" cellpadding="2" cellspacing="0" width="100%"
class="table_border">
<tr>
<td class="table_title_blue" valign="middle">People Picker</td>
</tr>
<tr>
<td>
<table border="0" cellpadding="1" cellspacing="0" width="98%"
align="center">
<tr>
<td colspan="2" align="center">
<br />
<input type="hidden" name="action" value="search">
Last Name: <input type="text" name="searchq">
<input type="submit" value="Search">
<br /><br />
<cfoutput>
<cfloop index="letter"
LIST="A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,All">
<span class="help"><cfif letter NEQ 'A'>|</cfif> <a
href="">
</cfloop>
</cfoutput>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<!--- Manage actions. --->
<cfif (IsDefined('form.action')) OR (IsDefined('url.letter'))>
<!--- Search and display results. --->
<cfquery name="search" datasource="#DSN#" username="#db_username#"
password="#db_password#">
SELECT *
FROM users
<cfif IsDefined('form.action')>
WHERE last_name ILIKE '%#form.searchq#%'
<cfelseif IsDefined('url.letter')>
<!--- If Browse by Alphabet is 'All', do not apply a where condition --->
<cfif url.letter NEQ 'All'>
WHERE last_name ILIKE '#lcase(url.letter)#%' OR last_name ILIKE
'#ucase(url.letter)#%'
</cfif>
</cfif>
ORDER BY
last_name
</cfquery>
<table border="0" cellpadding="2" cellspacing="0" width="100%"
class="table_border">
<tr>
<td class="table_title_blue" valign="middle">People Picker</td>
</tr>
<tr>
<td>
<br />Click on the name to add the user.
<br /><br />
<table border="0" cellpadding="1" cellspacing="0" width="98%"
align="center">
<tr>
<td class="tableheader">Name</td>
<td class="tableheader">Position</td>
<td class="tableheader">Dealership</td>
</tr>
<cfoutput query="search">
<tr>
<td><a href="">
#first_name#</a></td>
<td>#position#</td>
<td>
<cfquery name="check_dealer" datasource="#DSN#" username="#db_username#"
password="#db_password#">
SELECT *
FROM dealerships
WHERE dealership_id = #dealership#
</cfquery>
#check_dealer.dealership#
</td>
</tr>
</cfoutput>
</table>
<br />
</td>
</tr>
</table>
<p align="right">
<a href="" Window]</a>
</p>
</cfif>
</body>
</html>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- Re: JavaScript problem Jillian Carroll
- Re: JavaScript problem Greg Landers
- OT: JavaScript problem Spectrum WebDesign
- RE: JavaScript problem Philip Arnold
- Re: JavaScript problem Greg Landers
- OT: Javascript Problem Issac Rosa