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 7657491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:02:42+00:00 2026-05-31T13:02:42+00:00

I have an HTML demo page, whichs contain a placeholder || client ||. It’s

  • 0

I have an HTML demo page, whichs contain a placeholder “||client||”. It’s used throughout the page for example:

<img src="images/||_client_||/img1.jpg" />

or

<title>||_client_|| Demo</title>

and so on.

I want to globally replace the palceholder with the respective client ID once the page loads. The page is just for demo-purposes so I don’t want to set up anything server side.

I’m binding to this:

 $('div:jqmData(role="page")').on('pagebeforecreate', function() {  
  // replace ||_client_|| with some ID      
  });

Question:
Is there a Jquery method to run through the DOM and find all instances of my placeholder and replace them or do I have to do each one by hand and look for all img tags, check the src for substring and replace this substring? There must be a nicer way?

Thanks for help!

  • 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-31T13:02:44+00:00Added an answer on May 31, 2026 at 1:02 pm

    Why do you need jQuery?

    document.body.innerHTML = document.body.innerHTML.replace(/\|\|_client_\|\|/g, 'your text here');
    

    For the entire page:

    var html = document.getElementsByTagName('html')[0];
    html.innerHTML = html.innerHTML.replace(...);
    

    As a word of caution, make sure you do this after the page is ready (so that the body has all the elements), and before you bind events to any elements.

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

Sidebar

Related Questions

So I have this page: http://demo.unlockedmanagement.com/example/floating-issue.html You will notice 3 items: Details, Attachements, and
Apparently, the demo page on the http://twitter.github.com/bootstrap/javascript.html#carousel seems to have carousel stop rotating after
I have put this simple malformed HTML into htmlpurifier demo page (link with my
I have created the following demo: http://thedrivepartnership.com/overflow.html The scrolls expand fine in FireFox /
I have HTML page where windows media player is embedded. It works very well
I have HTML page with some HTML element with ID=logo . I need to
I have html like so: <div class=foo> (<a href=forum.example.com>forum</a>) <p> Some html here.... </div>
I'm trying to get an html5 demo page working on Android 2.1, have tried
I have a home page on which, inside an IFrame a different HTML page
I have this fragment that demonstrates the problem: <html> <head> <title>height query demo</title> <script

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.