הרשם שאלות ותשובות רשימת חברים לוח שנה חיפוש הודעות מהיום סמן פורומים כנקראו

   
|!|

השב
 
כלים לאשכול תצורת הצגה
ישן 29-06-09, 19:50   # 1
Ron | CSite.co.il
חבר על
 
מיני פרופיל
תאריך הצטרפות: Jun 2007
גיל: 34
הודעות: 980

Ron | CSite.co.il לא מחובר  

כן בעיה ידועה, תוסיף את זה לסקריפט שקורא ל ajax:

HTML קוד:
			// evaluate javascript
			scriptTag='(<script.*?>)((\n|\r|.)*?)(<\/script>)';
			if (scripts=resultsuser.match(scriptTag)) 
			{
				// remove slashes
			 	scripts[2]=scripts[2].replace(/\\/g,"");
			 	//run scripts
			 	eval(scripts[2]);
			}

דוג' לשילוב בקוד קריאה ל ajax:

HTML קוד:

//Browser Support Code
function call_ajax(DivUpdate,PageOpen,GetString)
{
	var ajaxRequest;  // The variable that makes Ajax possible!
	try
	{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} 
	catch (e)
	{
		// Internet Explorer Browsers
		try
		{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} 
		catch (e) 
		{
			try
			{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} 
			catch (e)
			{
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function()
	{
		var ajaxDisplay = document.getElementById(DivUpdate);
		if (ajaxRequest.readyState == 0 || ajaxRequest.readyState == 1  || ajaxRequest.readyState == 2 || 
		ajaxRequest.readyState == 3 )
		{
			loading = new Image(); loading.src = "template/themes/images/loading.gif";
			document.getElementById(DivUpdate).innerHTML = "<img src='template/themes/images/loading.gif' id='loading' />";
		}
		
		if(ajaxRequest.readyState == 4)
		{
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
			
			resultsuser = ajaxRequest.responseText;
			// evaluate javascript
			scriptTag='(<script.*?>)((\n|\r|.)*?)(<\/script>)';
			if (scripts=resultsuser.match(scriptTag)) 
			{
				// remove slashes
			 	scripts[2]=scripts[2].replace(/\\/g,"");
			 	//run scripts
			 	eval(scripts[2]);
			}		
		}
	}


	ajaxRequest.open("GET",PageOpen + GetString, true);
	ajaxRequest.send(null);  
}
  Reply With Quote
ישן 30-06-09, 00:34   # 2
Megnum
חבר וותיק
 
מיני פרופיל
תאריך הצטרפות: May 2007
מיקום: אשד
הודעות: 1,308

Megnum לא מחובר  

אתה ממש תותח, אני שונא את כל הבעיות השטותיות האלה חבל על הזמן.
שוב תודה !
  Reply With Quote
השב

חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים)
 

כלים לאשכול
תצורת הצגה

חוקי פירסום
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is מופעל
סמיילים הם מופעל
[IMG] קוד מופעל
קוד HTML מכובה

קפיצה לפורום


כל הזמנים הם GMT +2. הזמן כעת הוא 12:25.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ