Toon posts:

ASP fout in regel

Pagina: 1
Acties:

Verwijderd

Topicstarter
er zitten fouten in:
code:
1
output_form = output_form & "<option value='" & (branche.Fields.Item("ID").Value)& "'>" if output_form = output_form & "(CStr(branche.Fields.Item("ID").Value)) = request.form ("branche")" then response.write "selected" end if" <'" & (branche.Fields.Item("NL_Naam").Value)& " ' > </option>"

ik krijg deze fout, Expected end of statement ? maar ik zie ff niet waar.

  • Janoz
  • Registratie: Oktober 2000
  • Laatst online: 28-08 12:00

Janoz

Moderator Devschuur®

!litemod

Die if kun je niet zomaar midden in die toekenning zetten. Doe hoort gewoon op de volgende regel.

Ken Thompson's famous line from V6 UNIX is equaly applicable to this post:
'You are not expected to understand this'


  • 4of9
  • Registratie: Maart 2000
  • Laatst online: 15-04 15:52
als je naar de foutmelding kijkt zie je zoiets:

-------^

bij dat ^ zit de fout dan!

en je quote gebruik klopt niet zo te zien...

Aspirant Got Pappa Lid | De toekomst is niet meer wat het geweest is...


Verwijderd

Topicstarter
hmmm..
ik heb het even op een andere rij gezet:
code:
1
2
3
4
5
    output_form = output_form & "<option value='" & (branche.Fields.Item("ID").Value)& "'>" 
    if output_form = output_form & "(CStr(branche.Fields.Item("ID").Value)) = request.form ("branche")" then 
      response.write "selected" 
    end if
    "<'" & (branche.Fields.Item("NL_Naam").Value)& " ' > </option>

Expected 'Then'
heb wat ( ) proberen te zetten, maar lukt niet..blijft
Expected 'Then' aangeven

  • AntonicKnight
  • Registratie: Juni 2001
  • Laatst online: 01-09-2025
Wat probeer je met dit (3e regel):

output_form & "(CStr(branche.Fields.Item("ID").Value)) = request.form ("branche")"

te doen?? Moet je niet het keyword AND gebruiken?
\

Even herschreven: Ik weet niet precies hoe die f#!@cking option tags werken maar dit zal iig geen fouten geven hoop ik ;):
code:
1
2
3
4
5
6
    output_form = output_form & "<option value='" & (branche.Fields.Item("ID").Value)& "' " 
    If CStr(branche.Fields.Item("ID").Value) = request.form ("branche") Then 
      output_form = output_form & "selected" 
    End If
    output_form = output_form & ">"
    output_form = output_form & (branche.Fields.Item("NL_Naam").Value) & "</option>

MacBook Pro (mid-2010) || 2.4 GHz Core 2 Duo || 2x2GB || 64 GB OCZ Vertex + 640GB Samsung HM641JI || Eizo S2232WE-BK || Bose Companion II


  • mOrPhie
  • Registratie: September 2000
  • Laatst online: 23:55

mOrPhie

❤️❤️❤️❤️🤍

Op maandag 13 mei 2002 12:21 schreef PindaBit het volgende:
hmmm..
ik heb het even op een andere rij gezet:
code:
1
2
3
4
5
    output_form = output_form & "<option value='" & (branche.Fields.Item("ID").Value)& "'>" 
    if output_form = output_form & "(CStr(branche.Fields.Item("ID").Value)) = request.form ("branche")" then 
      response.write "selected" 
    end if
    "<'" & (branche.Fields.Item("NL_Naam").Value)& " ' > </option>

Expected 'Then'
heb wat ( ) proberen te zetten, maar lukt niet..blijft
Expected 'Then' aangeven
Die laatste regel kan niet zomaar. De rest is goed volgens mij.

Een experimentele community-site: https://technobabblenerdtalk.nl/. DM voor invite code.


  • AntonicKnight
  • Registratie: Juni 2001
  • Laatst online: 01-09-2025
Wat probeer je met dit (3e regel):

output_form & "(CStr(branche.Fields.Item("ID").Value)) = request.form ("branche")"

te doen?? Moet je niet het keyword AND gebruiken?
\

[edit1] Even herschreven: Ik weet niet precies hoe die f#!@cking option tags werken maar dit zal iig geen fouten geven hoop ik ;):
code:
1
2
3
4
5
6
    output_form = output_form & "<option value='" & (branche.Fields.Item("ID").Value)& "' " 
    If CStr(branche.Fields.Item("ID").Value) = request.form ("branche") Then 
      output_form = output_form & "selected" 
    End If
    output_form = output_form & ">"
    output_form = output_form & (branche.Fields.Item("NL_Naam").Value) & "</option>

[/edit1]
[edit2]Je hoeft die option tags niet af te sluiten dus dat mag weg[/edit2]

MacBook Pro (mid-2010) || 2.4 GHz Core 2 Duo || 2x2GB || 64 GB OCZ Vertex + 640GB Samsung HM641JI || Eizo S2232WE-BK || Bose Companion II


Verwijderd

Topicstarter
code:
1
2
3
4
5
6
output_form = output_form & "<option value='" & (branche.Fields.Item("ID").Value)& "' " 
    If CStr(branche.Fields.Item("ID").Value) = request.form ("branche") Then 
      output_form = output_form & "selected" 
    End If
    output_form = output_form & ">"
    output_form = output_form & (branche.Fields.Item("NL_Naam").Value) & "</option>"

dit werkt, tnx
Pagina: 1