User Profile

Collapse

Profile Sidebar

Collapse
Tarik Monem
Tarik Monem
Last Activity: May 19 '08, 06:08 PM
Joined: May 14 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Tarik Monem
    replied to Two loaders interchanging images
    The solution was for me to create an image that was 4000 px wide, which would be in the underneath loader, followed by having it move the exact width of each individual image, plus 10 px before the image in the above loader would be loaded.

    I know crude, but simple.

    Getting ready to post another question in regards to stopping the loop in the onEnterFrame.
    See more | Go to post

    Leave a comment:


  • Tarik Monem
    started a topic Two loaders interchanging images

    Two loaders interchanging images

    Hi guys,

    As usual, I've found some code from the net, changed it around, added some things and it works, but not exactly the way that I'd like it to work. I want it to work like the app on mtv.com, where one image remains on the main stage, then another image eases in over the top of the previous image.

    Basically, I have two loaders. When the timer ends, the bottom loader assumes the image that was on the stage and the...
    See more | Go to post
    Last edited by Tarik Monem; May 16 '08, 05:09 PM. Reason: Correction

  • Tarik Monem
    replied to missing } returned to AJAX posted
    Actually, mySeFunc does return a function to the Flex application and populates the datagrid with the info within the param being passed:
    Code:
    function mySeFunc(someArrayComing)
    {
        var flexApp = FABridge.fab.root();
        flexApp.myActionScriptFromJavascript(someArrayComing);
    }
    Here is the myActionScriptF romJavascript function within the Flex app:
    Code:
            public function
    ...
    See more | Go to post

    Leave a comment:


  • Tarik Monem
    replied to missing } returned to AJAX posted
    I'm sorry if I mis-understood, but I believe you are asking what initiates the echo. If this is the case, then the answer would be an ExternalInterfa ce.call from the Flex application, which calls a javascript function sendRequestPost 2():

    Code:
    	var phpscript2 = '../../two_arrays_into_one.php';
    
    	function createRequestObject() 
    	{	
    		var req;
    	
    		if(window.XMLHttpRequest)
    		{
    ...
    See more | Go to post

    Leave a comment:


  • Tarik Monem
    replied to missing } returned to AJAX
    in PHP
    Sorry about the missing code for $myTempVar, but that is used just to add a comma to the end of each record until the end is reached:
    Code:
    				 for($i=0;$i<$count;$i++)
    						{
    							 if($i<$count-1)
    							 {
    							 $myTempVar .= $myTempArray[$i].", ";
    							 }
    							 else
    							 {
    							 $myTempVar .= $myTempArray[$i];
    							 }
    						}
    ...
    See more | Go to post

    Leave a comment:


  • Tarik Monem
    replied to missing } returned to AJAX
    in PHP
    Yeah, I received a different error when escaping the ":" via illegal character error message.

    The thing that really bothers me about all this, is that this application worked with no errors or issues before the server crashed a week and a half ago and if I cut & paste the data generated from the PHP file directly into the JS function, then it works.

    I did discover something this afternoon as to where the...
    See more | Go to post

    Leave a comment:


  • Tarik Monem
    replied to missing } returned to AJAX
    in PHP
    I tried adding the "(" and ")" and it does not seem to help.

    For some reason, it seems to be having an issue with the ":" character after "javascript:myS eFunc([{SHOWS:" -- it does not matter what the first entry is because I have tried to manipulate the data to have other first entries and it would still hang on the ":" after the word SHOWS of the first entry.

    The weird...
    See more | Go to post

    Leave a comment:


  • Tarik Monem
    replied to missing } returned to AJAX posted
    Code:
    echo "javascript:mySeFunc([".$myTempVar."]);";
    From there the javascript file takes the echo:
    Code:
    window.onload = eval(response);
    Which calls the function to send the array to a datagrid within a Flex app:
    Code:
    function mySeFunc(someArrayComing)
    {
    	var flexApp = FABridge.fab.root();
    	flexApp.myActionScriptFromJavascript(someArrayComing);
    ...
    See more | Go to post
    Last edited by Tarik Monem; Mar 12 '08, 07:18 PM. Reason: add more code to explain issue fully

    Leave a comment:


  • Tarik Monem
    replied to missing } returned to AJAX posted
    The error reads exactly:

    Error: missing } in XML expression
    Source file: http://www.somedomain. com/someJSFile.js line 97
    javascript:mySe Func([{SHOWS:"some_sh ow",GENDER:"Mal e",...

    The arrow appears after the colon following SHOWS.

    It's like it is not reading the entire array as a string.

    Thanks in advance...
    See more | Go to post

    Leave a comment:


  • Tarik Monem
    replied to missing } returned to AJAX
    in PHP
    I tried your ideas of the single "'" character and removing the escape sequences, but the same error returns. The "{" has to be part of the string being sent back to the JavaScript file, so I didn't change the "{" part of it, as you suggested.

    Code:
    $myTempArray[$count] .= '{SHOWS:"'.htmlentities($shows_new2).'",GENDER:"'.htmlentities($gender_new2).'",AGE:"'.htmlentities($age_new2).'",FIRST_NAME:"'.htmlentities($user_first_name_new2).'",LAST_NAME:"'.htmlentities($user_last_name_new2).'",EMAIL_ADDRESS:"'.htmlentities($emailaddress_new2).'",PHONE_NUMBER:"'.htmlentities($phone_number_new2).'",CITY:"'.htmlentities($city_new2).'",STATE:"'.htmlentities($state_new2).'",ZIP:"'.htmlentities($zip_new2).'",PICTURE:"'.htmlentities($picture_new2).'"}';
    ...
    See more | Go to post
    Last edited by Tarik Monem; Mar 12 '08, 01:44 AM. Reason: left out something

    Leave a comment:


  • Tarik Monem
    started a topic missing } returned to AJAX posted

    missing } returned to AJAX posted

    Hi guys, it's me one more time today.

    I have a PHP file echoing an array back to a javascript file.

    Here's the Array being generated:
    Code:
    $myTempArray[$count] .= "{SHOWS:\"".htmlentities($shows_new2)."\",GENDER:\"".htmlentities($gender_new2)."\", AGE:\"".htmlentities($age_new2)."\",FIRST_NAME:\"".htmlentities($user_first_name_new2)."\",
    ...
    See more | Go to post
    Last edited by acoder; Mar 12 '08, 02:54 PM.

  • Tarik Monem
    started a topic missing } returned to AJAX
    in PHP

    missing } returned to AJAX

    Hi guys, it's me one more time today.

    I have a PHP file echoing an array back to a javascript file.

    Here's the Array being generated:
    Code:
    $myTempArray[$count] .= "{SHOWS:\"".htmlentities($shows_new2)."\",GENDER:\"".htmlentities($gender_new2)."\",AGE:\"".htmlentities($age_new2)."\",FIRST_NAME:\"".htmlentities($user_first_name_new2)."\",LAST_NAME:\"".htmlentities($user_last_name_new2)."\",EMAIL_ADDRESS:\"".htmlentities($emailaddress_new2)."\",PHONE_NUMBER:\"".htmlentities($phone_number_new2)."\",CITY:\"".htmlentities($city_new2)."\",STATE:\"".htmlentities($state_new2)."\",ZIP:\"".htmlentities($zip_new2)."\",PICTURE:\"".htmlentities($picture_new2)."\"}";
    ...
    See more | Go to post

  • Tarik Monem
    replied to error with strpos
    in PHP
    Here's what I came up with, if anyone is interested:
    Code:
    	$myComboVar = array();
    	$myNewCounter=0;
    	
    	for($someVar=0;$someVar<count($myTempArray);$someVar++)
    	{
    			$myTempTempVar = $myTempArray[$myNewCounter];
    			$myTempTempTempVar = $myTempDirArray[$someVar];
    			$pattern ="/([a-zA-Z0-9])+".$myTempTempTempVar."([a-zA-Z0-9_-])+/";
    			if(preg_match($pattern, $myTempTempVar))
    ...
    See more | Go to post

    Leave a comment:


  • Tarik Monem
    replied to error with strpos
    in PHP
    Thanks, via the two cents of a buddy I've actually came across this way of comparing arrays, but the values within the arrays are not the same so I don't know how else to compare unlike arrays.

    Code:
    $myComboVar = array_intersect($myTempArray, $myTempDirArray);
    Here are the values of one index of the myTempArray:
    Code:
    {SHOWS:"no_show_selected ", FIRST_NAME:"tarik", LAST_NAME:"monem",
    ...
    See more | Go to post

    Leave a comment:


  • Tarik Monem
    started a topic error with strpos
    in PHP

    error with strpos

    Hi, here I am again :-)

    I'm trying to compare the contents of two arrays and if there's a match, then I would like to place the contents of that one index of the array into a "new" third array.

    Here's the code:
    Code:
    	$myComboVar = array();
    	
    	for($someVar=0;$someVar<count($myTempArray);$someVar++)
    	{
    		for($myNewCounter=0;$myNewCounter<count($myTempArray);$myNewCounter++)
    ...
    See more | Go to post

  • Thanks for the feedback guys. I did echo the string and it was fine the way that it was (I tested the echoed string by copying & pasting it into phpmyadmin sql section) and I tried addslashes and htmlentities, but I don't know why I didn't think of stripslashes.

    Anyways! This was the solution that I came up with in the mean time, was to split the string and bring it back together again in PHP.

    Within Flex I broke...
    See more | Go to post
    Last edited by Tarik Monem; Feb 27 '08, 09:34 PM. Reason: spelling

    Leave a comment:


  • dynamic string sent to db receives MySQL error near '%'

    Hi Everyone,

    I need your help.

    I'm probably missing something simple but here's the string that I'm trying to send to the db:

    [code=mysql]
    Select distinct (email_address) from some_table where age BETWEEN 18 AND 19 AND state like 'ca%'
    [/code]

    If I copy and paste this statement directly into the SQL textarea of phpmyadmin it returns the result set that I am looking for with...
    See more | Go to post

  • First of all, thank you for replying and you were correct, but that wasn't all that was wrong.

    After I took your suggestion:

    Code:
    myTempArray[i] = '{LINK:"<a href=' + attr1 + ' target=_blank>' + avar[i].childNodes[0].nodeValue + '</a>"}';
    Not only did I add a double quote following the '</a>' but I also took out the double quotes after "href" and "target"...
    See more | Go to post

    Leave a comment:


  • passing Arrays to flex via AJAX, receiving illegal character error

    Hi Everyone,

    Still a newbie with FLEX, and I've passed arrays using AJAX to FLEX before, but I've never passed links to FLEX.

    Basically, this is the OUTPUT, which I wanted, but I'm given an error of "illegal character," from the JavaScript console:

    Code:
    Error: illegal character
    
    Source Code:
    javascript:mySeFunc([{LINK: \"<a href=\"http://www.mydomain.com/something\"
    ...
    See more | Go to post

  • OK, so I've changed the flex code to load an .swf file which can load pictures, but I'm having a hard time loading pics after the initial 25 jpegs load.

    Code:
    	<mx:VBox>
    		<mx:SWFLoader id="Load" source="@Embed(source='readfromdir4.swf')" height="150" width="100%"/>
    	</mx:VBox>
    I'm trying not to load all 6,000 images into the browser's...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...