webForumDet fria alternativet

Scriptfel !!

9 svar · 320 visningar · startad av martinpartin

martinpartinMedlem sedan jan. 2001373 inlägg
#1

Hejscriptfel på denna sida... tror att det har med konstiga tecken att göra. Hur gör jag för att göra om tecken ? har biogat källan samt felmeddelandet. Nån som har nån idé ?. är ingen höjdare på javascript !

Misstänker denna rad...

kommun[2][7]="A "Home fu|173";


<HTML>
<HEAD>
<TITLE></TITLE>
<link rel="stylesheet" type="text/css" href="style/style.css">
</HEAD>

<BODY>
<font class="textheader">Edit/Delete existing contact person</font><br><BR>

<script language="JavaScript" type="text/javascript">

var kommun = new Array(26);
for(var n=0;n<kommun.length;n++){
	kommun[n] = new Array();
}
kommun[0][0]="Choose Department";

kommun[2][0]="It is mand|166";

kommun[2][1]="Materials |167";

kommun[2][2]="Lighting, |168";

kommun[2][3]="Supporting|169";

kommun[2][4]="Window fra|170";

kommun[2][5]="The IKEA w|171";

kommun[2][6]="The IKEA w|172";

kommun[2][7]="A "Home fu|173";

kommun[2][8]="The IKEA w|174";

kommun[2][9]="The entran|175";

kommun[2][10]="For IKEA s|176";

kommun[2][11]="As part of|177";

kommun[2][12]="One group |178";

kommun[2][13]="The Swedis|179";

kommun[2][14]="National f|180";

kommun[2][15]="A group (o|181";

kommun[2][16]="White or g|182";

kommun[2][17]="White or g|183";

kommun[2][18]="5.5 x 2.0 |184";

kommun[2][19]="3.8 x 1.4 |185";

kommun[2][20]="The IKEA n|186";

kommun[2][21]="The IKEA w|187";

kommun[2][22]="The naviga|188";

kommun[2][23]="The facade|189";

kommun[2][24]="The banner|190";

kommun[2][25]="When enter|191";

kommun[2][26]="When enter|192";

kommun[2][27]="When exiti|193";

kommun[2][28]="Illuminate|194";

kommun[2][29]="Illuminate|195";

kommun[2][30]="Major sign|196";

kommun[2][31]="Elements t|197";

kommun[2][32]=""3 essenti|198";

kommun[2][33]="The exteri|199";

kommun[2][34]="The IKEA b|200";

kommun[2][35]="Every IKEA|50";

kommun[2][36]="It is mand|51";

kommun[2][37]="The interi|201";

kommun[2][38]="The IKEA t|202";

kommun[2][39]="TEST|210";

kommun[3][0]="IKEA of Sw|52";

kommun[3][1]="BAS/CAT ra|53";

kommun[4][0]="Offer wash|54";

kommun[4][1]="Offer shop|55";

kommun[4][2]="Communicat|56";

kommun[4][3]="Offer elev|57";

kommun[4][4]="Offer a fr|58";

kommun[4][5]="Offer benc|59";

kommun[4][6]="Range pres|60";

kommun[4][7]="Provide pl|61";

kommun[4][8]="Offer a lo|62";

kommun[4][9]="Provide a |63";

kommun[4][10]="Provide ba|64";

kommun[4][11]="Ensure tha|65";

kommun[5][0]="Self-servi|203";

kommun[6][0]="Inter IKEA|160";

kommun[6][1]="Promotion |161";

kommun[6][2]="When promo|162";

kommun[6][3]="Packaging |163";

kommun[6][4]="The IKEA T|164";

kommun[6][5]="Exemptions|165";

kommun[7][0]="No externa|152";

kommun[7][1]="An adverti|153";

kommun[7][2]="An adverti|154";

kommun[7][3]="An adverti|156";

kommun[8][0]="An adverti|155";

kommun[9][0]="Publicatio|157";

kommun[9][1]="Regarding |158";

kommun[9][2]="Publicatio|159";

kommun[10][0]="Create a n|66";

kommun[10][1]="Encourage |67";

kommun[10][2]="Provide ti|68";

kommun[10][3]="Present al|69";

kommun[10][4]="Communicat|70";

kommun[10][5]="Have at le|71";

kommun[10][6]="Inspire by|72";

kommun[10][7]="Create int|73";

kommun[10][8]="Present th|74";

kommun[10][9]="Present th|75";

kommun[10][10]="Communicat|76";

kommun[10][11]="Always pre|77";

kommun[10][12]="Create the|78";

kommun[10][13]="Enable con|79";

kommun[10][14]="Every CAT |80";

kommun[10][15]="Make it ea|81";

kommun[10][16]="Present th|82";

kommun[10][17]="Safeguard |83";

kommun[10][18]="Identity c|84";

kommun[10][19]="Identity c|85";

kommun[10][20]="Identity s|86";

kommun[10][21]="Identity a|87";

kommun[10][22]="Typography|88";

kommun[10][23]="Size: 21 x|89";

kommun[10][24]="Mass distr|90";

kommun[10][25]="Have store|91";

kommun[11][0]="IKEA Trade|1";

kommun[11][1]="Blue and y|2";

kommun[11][2]="Sell only |3";

kommun[11][3]="Lowest pri|4";

kommun[11][4]="Lowest pri|5";

kommun[11][5]="Value for |6";

kommun[11][6]="The IKEA c|7";

kommun[11][7]="References|8";

kommun[11][8]="Customer i|9";

kommun[11][9]="Obvious an|10";

kommun[11][10]="Generous a|11";

kommun[11][11]="Easy and q|12";

kommun[11][12]="Home inter|13";

kommun[11][13]="The IKEA o|14";

kommun[11][14]="Striving t|15";

kommun[11][15]="Large volu|16";

kommun[12][0]="It should |149";

kommun[12][1]="Every prod|150";

kommun[12][2]="When it co|151";

kommun[12][3]="Parking is|144";

kommun[12][4]="The (IKEA)|145";

kommun[12][5]="Vistors sh|146";

kommun[12][6]="The store |147";

kommun[12][7]="The store |148";

kommun[13][0]="In order t|99";

kommun[14][0]="A sales sp|92";

kommun[15][0]="The IKEA t|93";

kommun[15][1]="It is mand|94";

kommun[15][2]="The IKEA c|95";

kommun[15][3]="The IKEA c|96";

kommun[15][4]="For the IK|97";

kommun[16][0]="Regardless|98";

kommun[17][0]="The room s|100";

kommun[17][1]="Furniture |101";

kommun[17][2]="Furniture |102";

kommun[17][3]="Specialty |103";

kommun[18][0]="The Self-s|104";

kommun[19][0]="Every kitc|105";

kommun[20][0]="The wardro|106";

kommun[21][0]="Only IKEA |107";

kommun[21][1]="The IKEA l|108";

kommun[21][2]="There shal|109";

kommun[21][3]="Sales staf|110";

kommun[21][4]="IKEA shopp|111";

kommun[21][5]="There shal|112";

kommun[21][6]="The specia|113";

kommun[21][7]="Visitors s|114";

kommun[21][8]="Within eac|115";

kommun[21][9]="Each produ|116";

kommun[21][10]="IKEA shopp|117";

kommun[21][11]="The produc|118";

kommun[21][12]="When it is|119";

kommun[21][13]="The BAS cl|120";

kommun[22][0]="Only IKEA |121";

kommun[22][1]="Home furni|122";

kommun[22][2]="Visitors s|123";

kommun[22][3]="There shal|124";

kommun[22][4]="The Showro|125";

kommun[22][5]="The IKEA l|126";

kommun[22][6]="The produc|127";

kommun[22][7]="There shal|128";

kommun[22][8]="Living roo|129";

kommun[22][9]="The first |130";

kommun[22][10]="There shal|131";

kommun[22][11]="Each produ|132";

kommun[22][12]="There shal|133";

kommun[22][13]="To demonst|134";

kommun[22][14]="There shal|135";

kommun[22][15]="There shal|136";

kommun[22][16]="In Living |137";

kommun[22][17]="IKEA shopp|138";

kommun[22][18]="Home Furni|139";

kommun[22][19]="The BAS cl|140";

kommun[23][0]="It is mand|141";

kommun[24][0]="Blue and y|17";

kommun[24][1]="IKEA wordm|18";

kommun[24][2]="IKEA flags|19";

kommun[24][3]="Reinforced|20";

kommun[24][4]="A long nat|21";

kommun[24][5]="Showroom -|22";

kommun[24][6]="Showroom -|23";

kommun[24][7]="Showroom -|24";

kommun[24][8]="Showroom -|25";

kommun[24][9]="Showroom -|26";

kommun[24][10]="Market hal|27";

kommun[24][11]="Market hal|28";

kommun[24][12]="Market hal|29";

kommun[24][13]="Self-Serve|30";

kommun[24][14]="Self-Serve|31";

kommun[24][15]="Self-Serve|32";

kommun[24][16]="Self-Serve|33";

kommun[24][17]="Food and b|34";

kommun[24][18]="Food servi|35";

kommun[24][19]="Snack bar |36";

kommun[24][20]="Obvious pr|37";

kommun[24][21]="A clear lo|38";

kommun[24][22]="Low-price |39";

kommun[24][23]="“Breath-ta|40";

kommun[24][24]="A “best va|41";

kommun[24][25]="Product in|42";

kommun[24][26]="Home trans|43";

kommun[24][27]="Roof racks|44";

kommun[24][28]="Generous r|45";

kommun[24][29]="Standard f|46";

kommun[24][30]="Good suppl|47";

kommun[24][31]="Playroom f|48";

kommun[24][32]="Recognizab|49";

kommun[25][0]="When a dev|142";

function showSubKommun(subCat,selectObj){
	selectObj.length=kommun[subCat].length;
	for(var n=0;n<kommun[subCat].length;n++){
		selectObj[n].text=kommun[subCat][n].split("|")[0];
		selectObj[n].value=kommun[subCat][n].split("|")[1];

	}
}
</script>
<form method=post action="edit_store_2.asp">
<select name="lan" onChange="showSubKommun(this.selectedIndex,this.form.underKommun);" class="textbasic">
    <option value="" selected>Choose Department</option>

<option></option>

<option>Architectu</option>

<option>Choosing t</option>

<option>Family fri</option>

<option>Franchise </option>

<option>IISBV poli</option>

<option>IISBV poli</option>

<option>IISBV poli</option>

<option>IISBVs pol</option>

<option>IKEA Catal</option>

<option>IKEA Conce</option>

<option>IKEA Retai</option>

<option>IKEA Trade</option>

<option>In-store l</option>

<option>Marketing </option>

<option>Marketing </option>

<option>Range Pres</option>

<option>Self-serve</option>

<option>Selling IK</option>

<option>Selling IK</option>

<option>Selling in</option>

<option>Selling in</option>

<option>Space mana</option>

<option>The IKEA R</option>

<option>Working wi</option>

  </select>
<select name="underKommun" class="textbasic">
    <option value="null" selected>Choose person</option>
  </select><BR><BR>

<script>
function subm_edit(){
document.forms[0].action='edit_iisres_2.asp';  
document.forms[0].submit();
} 
function subm_delete(){
document.forms[0].action='del_iisres_1.asp';  
document.forms[0].submit();
} 
</script>

<input type="button" value="Edit" class="textbasic" onclick="subm_edit()" > 
<input type="button" value="Delete" class="textbasic" onclick="subm_delete()">

</form>

</BODY>
</HTML>
fel.jpg
Jesper TMedlem sedan nov. 20017 144 inlägg
#2

Om du skall ha med dubbelfnuttarna så måste du sätta en backslash före. Men jag antar att det skall vara så här?

kommun[2][32]="3 essenti|198";
kommun[2][7]="A  Home fu|173";
martinpartinMedlem sedan jan. 2001373 inlägg
#3

hej, nej tyvärr !

Den genereras från en databas med en massa roliga tecken.. har bara kortat ner det lite. Så sådana tecken kommer att förekomma. Så jag behöver konvertera om dem.

@ndersMedlem sedan juni 200032 969 inlägg
#4

JesperT skrev:

Om du skall ha med dubbelfnuttarna så måste du sätta en backslash före.

martinpartinMedlem sedan jan. 2001373 inlägg
#5

Vet du om det bara är dubbelfnuttar som ställer till det eller fler tecken ?

Jesper TMedlem sedan nov. 20017 144 inlägg
#6

Om du använder ASP:

array=RecSet("Ditt_databas_fält")
array=replace(array,"""","\""")
array=replace(array,"|","")
Jesper TMedlem sedan nov. 20017 144 inlägg
#7

Eftersom att du splittar med | så kanske det är smart att plocka bort dem också. Plocka även bort enkelfnuttar.

martinpartinMedlem sedan jan. 2001373 inlägg
#8

Ahh misstänkte nästan det... postar färdig kod när den fungerar...

Jesper TMedlem sedan nov. 20017 144 inlägg
#9

Jag gjorde ett litet test. Och för att det skall funka så är det endast dubbelfnutt som du skall plocka bort. :) Du kan ju testa att labba själv.

<script>
document.write("<%
Dim i
for i=33 to 255
Response.write chr(i)
'Response.write replace(chr(i),"""","\""")
next
%>");
</script>

eller

<script>
document.write("![b][blue]\[/blue][/b]"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ_¡¢£¤¥¦§¨©ª«¬_®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ");
</script>
martinpartinMedlem sedan jan. 2001373 inlägg
#10

Ok shysst ! kör på detta och det fungerar (ASP)

str_njoo = Replace(str_njoo,"""","\""")
str_njoo = Replace(str_njoo,"|","")
str_njoo = Replace(str_njoo, vbCrLf, "")
131 ms totalt · 3 externa anrop · v20260731065814-full.0e50b1ef
0 ms — hämta forumlista (cache)
0 ms — hämta statistik (cache)
128 ms — hämta tråd, inlägg och bilagor (db)