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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:02:19+00:00 2026-06-08T08:02:19+00:00

Hi I have a dropdown menu & whenever I change the option in the

  • 0

Hi I have a dropdown menu & whenever I change the option in the dropdown I want to change the content in the canvas…For example

var paper = Raphael("myDivID",400,400);
function smallRectangle(){
  paper.rect(10,10,100,50);
}
function bigRectangle(){
  paper.rect(10,10,150,100);
}

In my dropdown i’ll have two options “small rectangle” & “big rectangle”. I want to call corresponding functions on dropdown selection. The issue I’m facing with is that once i change the dropdown option Raphael don’t seem to draw it. I have read from some questions in stackoverflow that there is no need to use redraw technique in RaphaelJS
See the Answer!

Even If I try this way:

var paper = Raphael("myDivID",400,400);
function smallRectangle(){
  paper.clear()
  paper.rect(10,10,100,50);
}
function bigRectangle(){
  paper.clear()
  paper.rect(10,10,150,100);
}

This don’t seem to add elements to canvas after the clear() function. Canvas remains empty.

FYI:my code is very large so I posted this simple example here.

  • 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-08T08:02:21+00:00Added an answer on June 8, 2026 at 8:02 am

    There is no need to redraw the rect again ….

    function resize_Rect(rect,newWidth,newHeight){//passing rect ,new width and new height
             rect.attr({'width':newWidth,'height':newHeight});
                   }
    

    Hope it helps you out …

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

Sidebar

Related Questions

I have a simple dropdown menu: <form class=feedmenu align=center> <select onchange=showRSS1(this.value)> <option value=>Select an
I have a simple dropdown menu with some options eg: <select name='music_style' id='palmsForm-music_style'> <option
I have dropdown menu..which is dynamic.. How can get value of the last item
I have dropdown menu below where it retrieves the possible modules id's and their
I have a dropdown menu that pulls in text from a database column. The
I have a dropdown menu that I am using and can't quite get it
I have a dropdown menu on a website that works perfectly on all browsers
I have a dropdown menu that is filled by a mysql database. I need
I have a little dropdown menu similar <select> , which contolled from external js-function.
I have created a dropdown menu with jquery: here Everything is ok but in

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.