Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8999813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:13:47+00:00 2026-06-16T00:13:47+00:00

I have a script that generates multiple images from a external site using jQuery.

  • 0

I have a script that generates multiple images from a external site using jQuery. I am attempting to add functionality to select multiple images and submit them to a php script to archive the URLs.

My current iteration of the site is able to highlight all of the images without issue. However I am stumped as to how to use all highlighted images in a post to my php script. I added id= and data-value= to the imgsrc line and that is properly generating the img src lines with that code with unique id values.

The image generation code is as follows:

$('#images').append("<img id='" + id + "' src='http://example.com/" + id +
  "s.png' height='110' width='110' data-value='" + id + 
  "' onclick='clickpick(this)' />");

The onclick function is allowing me to highlight the clicked images with the following code:

function clickpick(item) {
    if (item.style.borderWidth == '5px') {
        item.style.border = '';
    } else {
        item.style.border = '5px solid blue';
    }
}

The end result is I would like to have a drop down box on the page which will select a group and any highlighted images will be posted to a php script as referenced by that group selection.

Any help or tips would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:13:48+00:00Added an answer on June 16, 2026 at 12:13 am

    I suggest you use jQuery and webservices.

    I have made an example for you, you can find it on http://jsfiddle.net/c685V/

    What I did is push the highlighted images in an array. Then with ajax, I call my webservice (webservices.php/mywebservice) which is accepting a string as a parameter.
    The parameter is a JSON string, and I parse the array to a JSON string with the JSON.stringify command.

    $.ajax({
        type: "POST",
        url: "webservices.php/mywebservice",
        data: "{'images':'" + JSON.stringify(arr) + "'}",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function (msg) {
            if (msg.d === "OK") {
                //do something
            }
        },
        fail: function (msg) {
            document.location = "/errorPage.php";
        }
    });
    

    I am not a PHP coder, but you can find examples on Google how to make a webservie and deserialize a JSON string back into an array.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a script that generates images from text using PHP. It's working fine
For automated testing (using Hudson) I have a script that generates a bunch of
I have an script that receives an encrypted url and from that generates a
I have a script that generates DDL scripts to define materialized views for a
I have a script that generates two lines as output each time. I'm really
I have a php script that randomly generates an image. Something like this: <?php
I have a python script that runs a program, which generates few .exe files
I have a datalist being generated with ASP, but unfortunately the jQuery script that
I want to create a single shape file from multiple mxd's that have multiple
I have an application that needs to join tables from multiple databases into a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.