الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

مشكله في هذا الكود ASP

مغلق
بدأه musaireae في 2 يناير 2007 · 8 رد · 711 مشاهدة · في منتدى تصميم صفحات الويب
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

اخواني ارجو حل المشاكل التي اواجهها في هذا الكود .

انا اعرف ان لدي مشكله في الرابط Update ولكن لا اعرف ما الحل.

واعرف ان لدي خطأ آخر ولكن لا ادري ما هو.

<%@language="vbscript" codepage = 1256 %> <%
Response.Buffer = True
Response.Expires = -1000
%>
<!-- #include FILE="adminlock.inc" -->
<!-- #include FILE="connect.inc" -->
<html dir="rtl">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link href="main.css" rel="stylesheet" type="text/css">
<script language="javascript">
<!--

function openwin(pid)
{
var id;
window.open("viewNeedCar.asp?pid="+pid ,"my_new_window","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=350,height=350")
	 // return false;
  }
  //-->
</script>
<!-- #include file="connect.asp" //-->
<title>Manage Jobs</title>
<%
if request.querystring("flage") ="Update" then
	sql_del = "Update needcar set atta="&request.queryString("atta")&" where id = "& request.queryString("id")
	'response.write(sql_del)
	con.execute(sql_del)
	response.redirect("Update1.asp")
end if
%>
</head>

<body>

<p align="center"><b><font size="5">تحديث طلب</font><font size="5"> سيارة مجانا</font></b></p>
<table width="196" align="left" border="0">
	<tr>
		<td width="112" align="center" class="atext"> </td>
	</tr>
</table>
<p> </p>
<center>
<% 
	a=request("T1")
	sql_disa ="Select * from needcar where ID="&a
	set rs_disa=con.execute(sql_disa)
	%>
<form name="ww">
	<div align="center">
		<table width="100%" align="left" border="0" id="TABLE1" cellspacing="5" cellpadding="2" style="height: 13px">
			<tr>
				<td align="right" class="atext" width="158"><b>
				<font face="Simplified Arabic" size="3">
				<span lang="AR-SA" dir="RTL">نوع السيارة:</span></font></b></td>
				<td align="right" class="atext" width="163">
				<font face="Simplified Arabic">
				<input type="text" name="a10" value="<%=rs_disa("atta")%>"  size="27"></font></td>
			</tr>
			<tr>
				<td align="right" class="atext" width="158"><b>
				<font face="Simplified Arabic" size="3">
				<span lang="AR-SA" dir="RTL">موديل السيارة:</span></font></b></td>
				<td align="right" class="atext" width="163">
				<font face="Simplified Arabic">
				<input type="text" name="a4" value="<%=rs_disa("attb")%>" size="27"></font></td>
			</tr>
			<tr>
				<td align="right" class="atext" width="158"><b>
				<font face="Simplified Arabic" size="3">
				<span lang="AR-SA" dir="RTL">بما لايزيد عن 400 حرف اضف بعض التفاصيل:
				</span></font></b>
				<p> </p>
				</td>
				<td align="right" class="atext" width="163"> <textarea name="bb" wrap rows="4" cols="88"><%=rs_disa("attd")%></textarea></td>
			</tr>
			<tr>
				<td align="right" class="atext" width="158"><b>
				<font face="Simplified Arabic" size="3">
				<span lang="AR-SA" dir="RTL">رقم المعلن:</span></font></b><p> </p>
				</td>
				<td align="right" class="atext" width="163">
				<font face="Simplified Arabic">
				<input type="text" value="<%=rs_disa("atte")%>" name="a9" size="27"></font></td>
			</tr>
			<tr>
				<td align="right" class="atext" width="158"><b>
				<font face="Simplified Arabic" size="3">
				<span lang="AR-SA" dir="RTL">البريد الإلكتروني:</span></font></b><p> </p>
				</td>
				<td align="right" class="atext" width="163">
				<font face="Simplified Arabic">
				<input type="text" value="<%=rs_disa("attf")%>" name="a8" size="27"></font></td>
			</tr>
			<tr>
				<td align="right" class="atext" width="158"><span dir="RTL"><b>
				<font face="Simplified Arabic">ID</font></b></span></td>
				<td align="right" class="atext" width="163">
				<font face="Simplified Arabic">
				<input name="a7" value="<%=rs_disa("ID")%>" readonly="true" size="3" style="float: right"></font></td>
			</tr>
			<tr>
				<td align="right" class="atext" width="158"> </td>
				<td align="right" class="atext" width="163">
				<b>
				<a href="Update1_submit.asp?flage=Update&id=<%=rs_disa("ID")%>&atta=document.ww.a10">
				Update</a></b></td>
			</tr>
		</table>
	</div>
</form>
</center></div>
</form>

</body>

</html>

وايضا لدي سؤال عن كيفيه معرفه هل التعليمه التاليه جلبت معلومات ام لا

<% 
	a=request("T1")
	sql_disa ="Select * from needcar where ID="&a
	set rs_disa=con.execute(sql_disa)
	%>

If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.

#2

السلام عليكم

اقتباس
وايضا لدي سؤال عن كيفيه معرفه هل التعليمه التاليه جلبت معلومات ام لا

استخدم الخاصية eof الموجودة في ال recordset اذا كانت true اي لا يوجد بيانات

if rs_disa.eof then no data in the recordset

هل تريد ان تعدل البيانات الموجودة في الفورم او فقط نوع السيارة

لانك واضع

<a href="Update1_submit.asp?flage=Update&id=<%=rs_disa("ID")%>&atta=document.ww.a10">

وهذا يعني تعديل الحقل atta الي document.ww.a10 بسبب هذه لجملة

sql_del = "Update needcar set atta="&request.queryString("atta")&" where id = "& request.queryString("id")

طبعا يجب وضع النص داخل علامات التنصيص والأفضل استبدال علامات ' ب ''مثال

"'"&replace(request.queryString("atta"),"'","''")&"'"

رجاء توضيح ما تريد عمله

والله أعلم

تم تعديل هذه المشاركة بواسطة Mo7eb_Alrasool في 3 يناير 2007 في 08:29

سبحانك اللهم وبحمدك أشهد ان لا اله الا أنت

أستغفرك وأتوب اليك

الهم صلي وسلم وبارك على سيدنا وحبيبنا محمد

#3

اشكرك على المساعده واتاسف لعدم وضوح المطلوب

انا اريد معرفه كيفيه نقل البيانات صحيحه في الامر التالي:

ما الخطأ في هذي التعليمه لانني قمت رفع الصفحه ولكن ظهر لي atta=document.ww.a10 كما هي لم تاتي لي بالقيمه عند التاشير على Update

<a href="Update1_submit.asp?flage=Update&id=<%=rs_disa("ID")%>&atta=document.ww.a10">
				Update</a>

If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.

#4

هل من مجيب.

If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.

#5

السلام عليكم

أسف أخي الكريم فقد نسيت هذا الموضوع :^)

<a href="java script:document.location='Update1_submit.asp?flage=Update&id=<%=rs_disa("ID")%>&atta='+document.ww.a10.value">

لا يوجد فراغ بين javascript

تم تعديل هذه المشاركة بواسطة Mo7eb_Alrasool في 6 يناير 2007 في 14:29

سبحانك اللهم وبحمدك أشهد ان لا اله الا أنت

أستغفرك وأتوب اليك

الهم صلي وسلم وبارك على سيدنا وحبيبنا محمد

#6

نفس المكله ظهرت مره آخرى ، لم يطرأ أي تغير .

هذه صوره لللينط الذي يظهر عند التأشير على Update

post-54949-1168092227_thumb.jpg

If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.

#7

السلام عليكم

عند التأشير سيظهر

java script:document.location='Update1_submit.asp?flage=Update&id=14&atta='+document.ww.a10.value

ولكن عند الضغط على

سيتم استبدال document.ww.a10.value بالقيمة الموجودة داخل مربع النص اللنك سيتم تنفيذ الكود الذي بعد ال java script:

اي سينتقل الى الموقع

Update1_submit.asp?flage=Update&id=14&atta=قيمة نوع السيارة

على اية حال اذا اردت ان يظهر قيمة نوع السيارة فب اللنك عند التأشير عليه اضف

هذا الى اللنك

onmousemove="window.status='Update1_submit.asp?flage=Update&id=14&atta='+document.ww.a10.value" 
onmouseout="window.status=window.defaultStatus"

ارجوا ان يكون هذا ما تريد

سبحانك اللهم وبحمدك أشهد ان لا اله الا أنت

أستغفرك وأتوب اليك

الهم صلي وسلم وبارك على سيدنا وحبيبنا محمد

#8

هذا هو المطلوب واشكرك على هذا التفاعل.

If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.

#9
<% 
	a=request("T1")
	sql_disa ="Select * from needcar where ID="&a
	set rs_disa=con.execute(sql_disa)
	%>

السلام عليكم

هذا الكود به خطأ

لا بد أن تبين للمتغير a القيمة التى سوف تخزن به تأتى من أين

مثلاً

a=request.querystring("t1")

أو

a=request.form("t1")

راسلنى على الميل حتى تتمكن من مواجهة المشكلة

kesseba@gmail.com

شكراً

هذا الموضوع مغلق.

مواضيع مشابهة