Re: redirect images url from live javascript

2013-07-06 Thread Eric Haskins
Trying to dechiper the question but I think he is getting the img tags via 
Ajax to render on his site. Can you give us the code you use to request 
said images and maybe we can give you some direction or js code to help you

Eric 


On Thursday, July 4, 2013 2:46:18 AM UTC-4, baur79 wrote:

 hi,

 i have use the 3rd party jquery ajax javascript 
 it returns me the live code which contain img tags
 as img scr=./images/file.png

 my url is example.com/tickets/
 (controller name is TicketsController.php)

 so img full path became as example.com/tickets/images/file.png
 and gives me error as

 Error: The action images is not defined in controller TicketsController 
 Error: Create TicketsController::images() in file: 
 app/Controller/TicketsController.php. 
 ?php class TicketsController extends AppController { 
  public function images() { 
  }
  } 
 Notice: If you want to customize this error message, create 
 app/View/Errors/missing_action.ctp

 how can i redirect only images url to 
 example.com/ticketstaff/images/file.png
 and place the images in folder 
 app/webroot/ticketstaff/images/








-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: redirect images url from live javascript

2013-07-06 Thread Eric Haskins
Its a hack and Im just taking a shot in the dark with no idea how you get 
the tags code wise but

script type=text/javascript
var imgurl = 'img src=./images/file.png'; // I assume this is already 
in a var somewhere just putting for sake of understanding
imgtag = imgurl.replace(./,/ticketstaff/);

alert(imgtag);
/script

Handles the url change.  You need to also download the images or do you 
have them??

Eric

On Thursday, July 4, 2013 2:46:18 AM UTC-4, baur79 wrote:

 hi,

 i have use the 3rd party jquery ajax javascript 
 it returns me the live code which contain img tags
 as img scr=./images/file.png

 my url is example.com/tickets/
 (controller name is TicketsController.php)

 so img full path became as example.com/tickets/images/file.png
 and gives me error as

 Error: The action images is not defined in controller TicketsController 
 Error: Create TicketsController::images() in file: 
 app/Controller/TicketsController.php. 
 ?php class TicketsController extends AppController { 
  public function images() { 
  }
  } 
 Notice: If you want to customize this error message, create 
 app/View/Errors/missing_action.ctp

 how can i redirect only images url to 
 example.com/ticketstaff/images/file.png
 and place the images in folder 
 app/webroot/ticketstaff/images/








-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: redirect images url from live javascript

2013-07-05 Thread baur79
please any hints?

On Thursday, July 4, 2013 12:46:18 PM UTC+6, baur79 wrote:

 hi,

 i have use the 3rd party jquery ajax javascript 
 it returns me the live code which contain img tags
 as img scr=./images/file.png

 my url is example.com/tickets/
 (controller name is TicketsController.php)

 so img full path became as example.com/tickets/images/file.png
 and gives me error as

 Error: The action images is not defined in controller TicketsController 
 Error: Create TicketsController::images() in file: 
 app/Controller/TicketsController.php. 
 ?php class TicketsController extends AppController { 
  public function images() { 
  }
  } 
 Notice: If you want to customize this error message, create 
 app/View/Errors/missing_action.ctp

 how can i redirect only images url to 
 example.com/ticketstaff/images/file.png
 and place the images in folder 
 app/webroot/ticketstaff/images/








-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: redirect images url from live javascript

2013-07-05 Thread Simon Males
Share the code generating the img element.


On Fri, Jul 5, 2013 at 2:23 PM, baur79 bau...@gmail.com wrote:

 please any hints?


 On Thursday, July 4, 2013 12:46:18 PM UTC+6, baur79 wrote:

 hi,

 i have use the 3rd party jquery ajax javascript
 it returns me the live code which contain img tags
 as img scr=./images/file.png

 my url is example.com/tickets/
 (controller name is TicketsController.php)

 so img full path became as 
 example.com/tickets/images/**file.pnghttp://example.com/tickets/images/file.png
 and gives me error as

 Error: The action images is not defined in controller TicketsController
 Error: Create TicketsController::images() in file: app/Controller/**
 TicketsController.php.
 ?php class TicketsController extends AppController {
  public function images() {
  }
  }
 Notice: If you want to customize this error message, create
 app/View/Errors/missing_**action.ctp

 how can i redirect only images url to
 example.com/ticketstaff/**images/file.pnghttp://example.com/ticketstaff/images/file.png
 and place the images in folder
 app/webroot/ticketstaff/**images/






  --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to cake-php+unsubscr...@googlegroups.com.
 To post to this group, send email to cake-php@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php.
 For more options, visit https://groups.google.com/groups/opt_out.






-- 
Simon Males

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: redirect images url from live javascript

2013-07-05 Thread baur79
all images return with the relative path as
 img scr=./images/file.png

all i need to redirect 
example.com/tickets/images/file.png
to 
example.com/ticketstaff/images/file.png 

On Friday, July 5, 2013 5:46:35 PM UTC+6, Simon Males wrote:

 Share the code generating the img element.


 On Fri, Jul 5, 2013 at 2:23 PM, baur79 bau...@gmail.com javascript:wrote:

 please any hints?


 On Thursday, July 4, 2013 12:46:18 PM UTC+6, baur79 wrote:

 hi,

 i have use the 3rd party jquery ajax javascript 
 it returns me the live code which contain img tags
 as img scr=./images/file.png

 my url is example.com/tickets/
 (controller name is TicketsController.php)

 so img full path became as 
 example.com/tickets/images/**file.pnghttp://example.com/tickets/images/file.png
 and gives me error as

 Error: The action images is not defined in controller TicketsController 
 Error: Create TicketsController::images() in file: app/Controller/**
 TicketsController.php. 
 ?php class TicketsController extends AppController { 
  public function images() { 
  }
  } 
 Notice: If you want to customize this error message, create 
 app/View/Errors/missing_**action.ctp

 how can i redirect only images url to 
 example.com/ticketstaff/**images/file.pnghttp://example.com/ticketstaff/images/file.png
 and place the images in folder 
 app/webroot/ticketstaff/**images/






  -- 
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP
  
 --- 
 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to cake-php+u...@googlegroups.com javascript:.
 To post to this group, send email to cake...@googlegroups.comjavascript:
 .
 Visit this group at http://groups.google.com/group/cake-php.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  




 -- 
 Simon Males 


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




RE: redirect images url from live javascript

2013-07-05 Thread Advantage+
If you are creating images in emails, or want absolute paths to images you
can use the fullBase option:

echo $this-Html-image(logo.png, array('fullBase' = true));

 

 

From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of baur79
Sent: Friday, July 05, 2013 9:37 AM
To: cake-php@googlegroups.com
Subject: Re: redirect images url from live javascript

 

all images return with the relative path as

 img scr=./images/file.png

 

all i need to redirect 

example.com/tickets/images/file.png

to 

example.com/ticketstaff/images/file.png 


On Friday, July 5, 2013 5:46:35 PM UTC+6, Simon Males wrote:

Share the code generating the img element.

 

On Fri, Jul 5, 2013 at 2:23 PM, baur79 bau...@gmail.com javascript: 
wrote:

please any hints?



On Thursday, July 4, 2013 12:46:18 PM UTC+6, baur79 wrote:

hi,

i have use the 3rd party jquery ajax javascript 

it returns me the live code which contain img tags
as img scr=./images/file.png

my url is example.com/tickets/
(controller name is TicketsController.php)

so img full path became as example.com/tickets/images/file.png
and gives me error as

Error: The action images is not defined in controller TicketsController 
Error: Create TicketsController::images() in file:
app/Controller/TicketsController.php. 

?php class TicketsController extends AppController { 

 public function images() { 

 }

 } 
Notice: If you want to customize this error message, create
app/View/Errors/missing_action.ctp

how can i redirect only images url to 

example.com/ticketstaff/images/file.png
and place the images in folder 

app/webroot/ticketstaff/images/







-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
--- 
You received this message because you are subscribed to the Google Groups
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an
email to cake-php+u...@googlegroups.com javascript: .
To post to this group, send email to cake...@googlegroups.com javascript:
.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
 
 




-- 
Simon Males 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
--- 
You received this message because you are subscribed to the Google Groups
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an
email to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: redirect images url from live javascript

2013-07-05 Thread baur79
thanks, but no
the img tag in ajaxed javascript code  which i get from 3rd party site.

On Friday, July 5, 2013 6:09:24 PM UTC+6, advantage+ wrote:

 If you are creating images in emails, or want absolute paths to images you 
 can use the fullBase option:

 echo $this-Html-image(logo.png, array('fullBase' = true));

  

  

 *From:* cake...@googlegroups.com javascript: [mailto:
 cake...@googlegroups.com javascript:] *On Behalf Of *baur79
 *Sent:* Friday, July 05, 2013 9:37 AM
 *To:* cake...@googlegroups.com javascript:
 *Subject:* Re: redirect images url from live javascript

  

 all images return with the relative path as

  img scr=./images/file.png

  

 all i need to redirect 

 example.com/tickets/images/file.png

 to 

 example.com/ticketstaff/images/file.png 


 On Friday, July 5, 2013 5:46:35 PM UTC+6, Simon Males wrote:

 Share the code generating the img element.

  

 On Fri, Jul 5, 2013 at 2:23 PM, baur79 bau...@gmail.com wrote:

 please any hints?



 On Thursday, July 4, 2013 12:46:18 PM UTC+6, baur79 wrote:

 hi,

 i have use the 3rd party jquery ajax javascript 

 it returns me the live code which contain img tags
 as img scr=./images/file.png

 my url is example.com/tickets/
 (controller name is TicketsController.php)

 so img full path became as example.com/tickets/images/file.png
 and gives me error as

 Error: The action images is not defined in controller TicketsController 
 Error: Create TicketsController::images() in file: 
 app/Controller/TicketsController.php. 

 ?php class TicketsController extends AppController { 

  public function images() { 

  }

  } 
 Notice: If you want to customize this error message, create 
 app/View/Errors/missing_action.ctp

 how can i redirect only images url to 

 example.com/ticketstaff/images/file.png
 and place the images in folder 

 app/webroot/ticketstaff/images/





 -- 
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP
  
 --- 
 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to cake-php+u...@googlegroups.com.
 To post to this group, send email to cake...@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  




 -- 
 Simon Males 

 -- 
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP
  
 --- 
 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to cake-php+u...@googlegroups.com javascript:.
 To post to this group, send email to cake...@googlegroups.comjavascript:
 .
 Visit this group at http://groups.google.com/group/cake-php.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




RE: redirect images url from live javascript

2013-07-05 Thread Advantage+
If you know the base URL why not simply add it as a var basePath =
http://example.com;; in the javascript.

 

$.ajax({

type: GET,

url: basePath + image,

//cache: false,

dataType: html, 

success: function(response) {

 

From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of baur79
Sent: Friday, July 05, 2013 3:41 PM
To: cake-php@googlegroups.com
Subject: Re: redirect images url from live javascript

 

thanks, but no

the img tag in ajaxed javascript code  which i get from 3rd party site.

On Friday, July 5, 2013 6:09:24 PM UTC+6, advantage+ wrote:

If you are creating images in emails, or want absolute paths to images you
can use the fullBase option:

echo $this-Html-image(logo.png, array('fullBase' = true));

 

 

From: cake...@googlegroups.com javascript:
[mailto:cake...@googlegroups.com javascript: ] On Behalf Of baur79
Sent: Friday, July 05, 2013 9:37 AM
To: cake...@googlegroups.com javascript: 
Subject: Re: redirect images url from live javascript

 

all images return with the relative path as

 img scr=./images/file.png

 

all i need to redirect 

example.com/tickets/images/file.png

to 

example.com/ticketstaff/images/file.png 


On Friday, July 5, 2013 5:46:35 PM UTC+6, Simon Males wrote:

Share the code generating the img element.

 

On Fri, Jul 5, 2013 at 2:23 PM, baur79 bau...@gmail.com wrote:

please any hints?



On Thursday, July 4, 2013 12:46:18 PM UTC+6, baur79 wrote:

hi,

i have use the 3rd party jquery ajax javascript 

it returns me the live code which contain img tags
as img scr=./images/file.png

my url is example.com/tickets/
(controller name is TicketsController.php)

so img full path became as example.com/tickets/images/file.png
and gives me error as

Error: The action images is not defined in controller TicketsController 
Error: Create TicketsController::images() in file:
app/Controller/TicketsController.php. 

?php class TicketsController extends AppController { 

 public function images() { 

 }

 } 
Notice: If you want to customize this error message, create
app/View/Errors/missing_action.ctp

how can i redirect only images url to 

example.com/ticketstaff/images/file.png
and place the images in folder 

app/webroot/ticketstaff/images/






-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
--- 
You received this message because you are subscribed to the Google Groups
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an
email to cake-php+u...@googlegroups.com.
To post to this group, send email to cake...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
 
 




-- 
Simon Males 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
--- 
You received this message because you are subscribed to the Google Groups
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an
email to cake-php+u...@googlegroups.com javascript: .
To post to this group, send email to cake...@googlegroups.com javascript:
.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
--- 
You received this message because you are subscribed to the Google Groups
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an
email to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.