This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > April 2004 > a problem for all you wonderfull people....:)





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author a problem for all you wonderfull people....:)
Krille

2004-04-21, 2:48 pm

Hey everyone!

I am a semi good webmaster for a company in sweden and i have a problem....
I am trying to make a page that depending on what i write in a database i
either get a link or i dont get a link on the page.

I get the first link to work, but the second one wont work no matter what i do
Here is the code with the 2 links.......anyone have any idea whats wrong?


<table width="388" border="0">
<tr>
<td width="382" class="meny"><font size="2">
<% If (rs.Fields.Item("arstaavgPOL_A").Value) = "ja" Then %>
<a href="etikett.asp?Typ=arstaavgPOL_A"arstaavgpol_a">Låda
Årsta
AVG Postöppning A</a><br>
<% Else %>
<a> </a><br>
<% End If %>
</font></td>
</tr>
<tr>
<td class="meny"><font size="2">
<% If (rs.Fields.Item("arstaavgPOL_B").Value) = "ja" Then %>
<a href="etikett.asp?Typ=arstaavgPOL_B">Låda Årsta
AVG Postöppning B</a><br>
<% Else %>
<a> </a><br>
<% End If %>
</font></td>
</tr>
</table>

Murray *TMM*

2004-04-21, 2:48 pm

Here are some comments -

<table width="388" border="0">
<tr>
<td width="382" class="meny"><font size="2">
<% If (rs.Fields.Item("arstaavgPOL_A").Value) = "ja" Then %>
<a href="etikett.asp?Typ=arstaavgPOL_A"arstaavgpol_a">Låda
Årsta
AVG Postöppning A</a><br>

***Why do you have three double quotes in that <a> tag above?

<% Else %>
<br>

***I removed the "<a> </a>" link altogether.

<% End If %>
</font></td>
</tr>
<tr>
<td class="meny"><font size="2">
<% If (rs.Fields.Item("arstaavgPOL_B").Value) = "ja" Then %>
<a href="etikett.asp?Typ=arstaavgPOL_B">Låda Årsta
AVG Postöppning B</a><br>

***Note the three double quotes again.

<% Else %>
<br>

***Removed the empty link.

<% Ejd If %>
</font></td>
</tr>
</table>


--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macroiedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Krille" <webforumsuser@macromedia.com> wrote in message
news:c5oh3c$l4f$1@forums.macromedia.com...
> Hey everyone!
>
> I am a semi good webmaster for a company in sweden and i have a

problem....
> I am trying to make a page that depending on what i write in a database i
> either get a link or i dont get a link on the page.
>
> I get the first link to work, but the second one wont work no matter what

i do
> Here is the code with xhe 2 links.......anyone have any idea whats wrong?
>
>
> <table width="388" border="0">
> <tr>
> <td width="38:" class="meny"><font size="2">
> <% If (rs.Fields.Item("arstaavgPOL_A").Value) = "ja" Then %>
> <a href="etikett.asp?Typ=arstaavgPOL_A"arstaavgpol_a">Låda
> Årsta
> AVG Postöppning A</a><br>
> <% Else %>
> <a> </a><br>
> <% End If %>
> </font></td>
> </tr>
> <tr>
> <td class="meny"><font size="2">
> <% If (rs.Fields.Item("arstaavgPOL_B").Value) = "ja" Then %>
> <a href="etikett.asp?Typ9arstaavgPOL_B">Låda &Arinc;rsta
> AVG Postöppning B</a><br>
> <% Else %>
> <a> </a><br>
> <% End If %>
> </font></td>
> </tr>
> </table>
>



Krille

2004-04-21, 2:48 pm

thx for the input.
Removed all the extra quotemarks but still cant get it to work....
it might not have with theese lines at all since i get a error message like
this:

Either BOF or EOF is True, or the current record has been deleted. Requested
operation requires a current record.

Problem is that they are exactly the same in the database...there is one
arstaavgPOL_A and one arstaavgPOL_B
Both has the value "ja" so what is wrong?




Murray *TMM*

2004-04-21, 2:48 pm

Does your recordset include both values?

Which 'extra' quotemarks did you remove? I didn't see an obvious way to
construct a valid line of code there.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Krille" <webforumsuser@macromedia.com> wrote in message
news:c5oj7m$o26$1@forums.macromedia.com...
> thx for the input.
> Removed all the extra quotemarks but still cant get it to work....
> it might not have with theese lines at all since i get a error message

like
> this:
>
> Either BOF or EOF is True, or the current record has been deleted.

Requested
> operation requires a current record.
>
> Problem is that they are exactly the same in the database...there is one
> arstaavgPOL_A and one arstaavgPOL_B
> Both has the value "ja" so what is wrong?
>
>
>
>



Krille

2004-04-21, 2:49 pm

Ok i will post my codes as they are now
Problem is in the new page i am supposed to make a page that makes a new post
in the database with 1 value that filters the page. that value is:
arstaavgPOL_A and arstaavgPOL_B. So the recordset on the next page doesnt have
that value in it it only has it as a hidden field that goes into the database
when i submit the page.

Sorry if i am so bad at explaining.....hope you understand what i mean..:)

<table width="388" border="0">
<tr>
<td width="382" class="meny"><font size="2">
<% If (rs.Fields.Item("arstaavgPOL_A").Value) = "ja" Then %>
<a href="etikett.asp?Typ=arstaavgPOL_A">Låda Årsta
AVG Postöppning A</a><br>
<% Else %>
<% End if %>
</font></td>
</tr>
<tr>
<td class="meny"><font size="2">
<% If (rs.Fields.Item("arstaavgPOL_B").Value) = "ja" Then %>
<a href="etikett.asp?Typ=arstaavgPOL_B">Låda Årsta AVG
Postöppning
B </a><br>
<% Else %>
<% End if %>
</font></td>
</tr>
</table>

Krille

2004-04-21, 2:59 pm

Bump for help....plz help i am stuck!

Or am i just a bad webmaster who is doing it all wrong?
Murray *TMM*

2004-04-21, 3:01 pm

When you test the recordset on that page (using DW's test ability in the
recordset definition), do you see both fields represented?

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Krille" <webforumsuser@macromedia.com> wrote in message
news:c6029o$6ms$1@forums.macromedia.com...
> Bump for help....plz help i am stuck!
>
> Or am i just a bad webmaster who is doing it all wrong?



Krille

2004-04-21, 3:04 pm

Yes i see both posts when i test it.....still hav eno idea why i get the first link to work and not the second.....should be exactly the same
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews