| Author |
JSP Dynamic Email Address
|
|
|
| Hi, i need to generate a dynamic list of emails from a db with hrefs (mailto:)
built in.
i took this approach from the macromedia tech notes and can't get it to fire.
Can anyone tell me why this tag works -
<%=(((Recordset1_data = Recordset1.getObject("Email"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%>
and this throws an execption ('No data found")-
<a href="mailto:<%=(((Recordset1_data = Recordset1.getObject("Email"))==null
|| Recordset1.wasNull())?"":Recordset1_data)%>"><%=(((Recordset1_data =
Recordset1.getObject("Email"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%></a>
any help would be great...
| |
| Chris In Madison 2004-08-26, 12:18 pm |
| If you run the same query from the database's command line that you're using
to build this recordset, does it return any results? What kind of DB are
you using?
Best regards,
Chris
| |
|
| Chris, thanks for your reply. I don't normally work in JSP code but I took it
apart bit by bit and came up with this...
- it seems that 'Recordset1_data' already gets a value from the first
iteration and doesn't like being told it has to recalculate itself. thus...
a href="mailto:<%=(((Recordset1_data = Recordset1.getObject("Email"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%>"><%=(Recordset1_data)%></a
is the solution... cheers
| |
| Chris In Madison 2004-08-26, 12:20 pm |
| Great :-) Thanks for sharing your solution.
Best regards,
Chris
|
|
|
|
| Copyright 2003 - 2009 forum4designers.com Software forum Computer Hardware reviews |