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

  • SEARCH
  • Home
  • 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 6681677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:37:01+00:00 2026-05-26T04:37:01+00:00

I am using jQuery 1.3.2 and I have an input field on my page

  • 0

I am using jQuery 1.3.2 and I have an input field on my page that provides link to be copied, like this one: http://mydomain.com/resize.php?src=http://www.externaldomain.com/content/Uploads/everydaymail.jpg&w=533&h=400&zc=1 . I would like to use jQuery and be able to change w=533 part to w=300, for example and also the h=400 to change into h=200 . This is an image resizing script that I’m using and I want to be able to change the height and width parameters from that link in the inputbox with my desired values that are dynamic.

I am no good at regex, can anyone provide an example/suggestion ?

Thanks.

  • 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-05-26T04:37:01+00:00Added an answer on May 26, 2026 at 4:37 am

    I ended up using:

    var newWVal = $('#inputfield').val().replace(/w=[\d\.]+&/g, 'w='+imageWidth+'&');
    var newFinalVal = newWVal.replace(/h=[\d\.]+&/g, 'h='+imageHeight+'&');
    $('#inputfield').val(newFinalVal);
    

    I think the regex could be a little smarter but it also works great this way.

    Thank you for your suggestions.

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

Sidebar

Related Questions

i have many forms on one page. i'm using jquery and ajax to update
I have this page and this page that i have datepickers on them using
I have a one-page portfolio style website that scrolls with JQuery, and I cannot
I have a View where some input text to be added dynamica using jquery,
I have a JQuery (using JQuery 1.4.2) problem that exhibits only in IE8 in
I have started using jQuery and rails. I have made a simple form that
I have a MVC app and using JQuery. I have anchor that I setup
I have an MVC app that is basically one page with a bunch of
I have a function using jQuery function enableField(fieldID) { $(# + fieldID).removeAttr('disabled').focus().select(); } that
I have a form in my HTML page, containing a label, an input field

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.